(e: TouchEvent)
| 71 | window.removeEventListener("touchmove", onTouchMove); |
| 72 | }; |
| 73 | const onTouchMove = (e: TouchEvent) => { |
| 74 | if (e.touches.length > 1) return; |
| 75 | const touch = e.touches[0]; |
| 76 | const delta = new Vector(touch.clientX, touch.clientY).subtract(start); |
| 77 | const newRect = win.rect.translate(delta); |
| 78 | SubWindow.update(win.id, { rect: newRect }); |
| 79 | }; |
| 80 | window.addEventListener("touchend", onTouchEnd); |
| 81 | window.addEventListener("touchmove", onTouchMove); |
| 82 | }} |