(e: KonvaEventObject<MouseEvent | TouchEvent>)
| 49 | }; |
| 50 | |
| 51 | const handlePointerMove = (e: KonvaEventObject<MouseEvent | TouchEvent>) => { |
| 52 | if (!isDrawing.current || tool !== "arrow") return; |
| 53 | |
| 54 | const stage = e.target.getStage(); |
| 55 | const pos = stage ? getPointerPositionRelativeToStage(stage) : null; |
| 56 | if (!pos) return; |
| 57 | |
| 58 | if (currentArrowId.current) { |
| 59 | const arrow = arrows.find((a) => a.id === currentArrowId.current); |
| 60 | if (arrow) { |
| 61 | updateArrowInStore(currentArrowId.current, { |
| 62 | points: [0, 0, pos.x - arrow.x, pos.y - arrow.y], |
| 63 | }); |
| 64 | } |
| 65 | } |
| 66 | }; |
| 67 | |
| 68 | const handlePointerUp = () => { |
| 69 | isDrawing.current = false; |
nothing calls this directly
no test coverage detected