(id: string, e: KonvaEventObject<Event>)
| 251 | }; |
| 252 | |
| 253 | const handleLineDragEnd = (id: string, e: KonvaEventObject<Event>) => { |
| 254 | const node = e.target as Konva.Line; |
| 255 | const deltaX = node.x(); |
| 256 | const deltaY = node.y(); |
| 257 | |
| 258 | if (deltaX === 0 && deltaY === 0) return; |
| 259 | |
| 260 | const line = drawingLines.lines.find((line) => line.id === id); |
| 261 | if (!line) return; |
| 262 | |
| 263 | node.position({ x: 0, y: 0 }); |
| 264 | drawingLines.updateLine(id, { |
| 265 | initialX: line.initialX + deltaX, |
| 266 | initialY: line.initialY + deltaY, |
| 267 | x: line.x + deltaX, |
| 268 | y: line.y + deltaY, |
| 269 | }); |
| 270 | }; |
| 271 | |
| 272 | const handleEllipseDragEnd = (id: string, e: KonvaEventObject<Event>) => { |
| 273 | const node = e.target as Konva.Ellipse; |
nothing calls this directly
no outgoing calls
no test coverage detected