MCPcopy Create free account
hub / github.com/Shitanshukumar607/Drawspace / handlePointerMove

Function handlePointerMove

hooks/DrawLineTool.ts:52–62  ·  view source on GitHub ↗
(e: KonvaEventObject<MouseEvent | TouchEvent>)

Source from the content-addressed store, hash-verified

50 };
51
52 const handlePointerMove = (e: KonvaEventObject<MouseEvent | TouchEvent>) => {
53 if (!isDrawing.current || tool !== "line") return;
54
55 const stage = e.target.getStage();
56 const pos = stage ? getPointerPositionRelativeToStage(stage) : null;
57 if (!pos) return;
58
59 if (currentLineId.current) {
60 updateLineInStore(currentLineId.current, { x: pos.x, y: pos.y });
61 }
62 };
63
64 const handlePointerUp = () => {
65 isDrawing.current = false;

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected