(canvas, sx, sy, touch)
| 871 | } |
| 872 | |
| 873 | function getTouchInfo(canvas, sx, sy, touch) { |
| 874 | const rect = canvas.getBoundingClientRect(); |
| 875 | return { |
| 876 | x: (touch.clientX - rect.left) / sx, |
| 877 | y: (touch.clientY - rect.top) / sy, |
| 878 | winX: touch.clientX, |
| 879 | winY: touch.clientY, |
| 880 | id: touch.pointerId |
| 881 | }; |
| 882 | } |
| 883 | |
| 884 | fn._setMouseButton = function(e) { |
| 885 | // Check all active touches to determine button states |