(
id: string,
e: KonvaEventObject<Event>
)
| 230 | }; |
| 231 | |
| 232 | const handleRectangleTransformEnd = ( |
| 233 | id: string, |
| 234 | e: KonvaEventObject<Event> |
| 235 | ) => { |
| 236 | const node = e.target as Konva.Rect; |
| 237 | const scaleX = node.scaleX(); |
| 238 | const scaleY = node.scaleY(); |
| 239 | const width = Math.max(node.width() * scaleX, 5); |
| 240 | const height = Math.max(node.height() * scaleY, 5); |
| 241 | |
| 242 | node.scaleX(1); |
| 243 | node.scaleY(1); |
| 244 | |
| 245 | drawingRectangle.updateRectangle(id, { |
| 246 | x: node.x(), |
| 247 | y: node.y(), |
| 248 | width, |
| 249 | height, |
| 250 | }); |
| 251 | }; |
| 252 | |
| 253 | const handleLineDragEnd = (id: string, e: KonvaEventObject<Event>) => { |
| 254 | const node = e.target as Konva.Line; |
nothing calls this directly
no outgoing calls
no test coverage detected