(event: PointerEvent<HTMLDivElement>)
| 28 | const [selection, setSelection] = useState<CropRect | null>(null); |
| 29 | |
| 30 | const getPoint = (event: PointerEvent<HTMLDivElement>) => { |
| 31 | const bounds = event.currentTarget.getBoundingClientRect(); |
| 32 | |
| 33 | return { |
| 34 | x: Math.min(Math.max(event.clientX - bounds.left, 0), bounds.width), |
| 35 | y: Math.min(Math.max(event.clientY - bounds.top, 0), bounds.height), |
| 36 | }; |
| 37 | }; |
| 38 | |
| 39 | const onPointerDown = (event: PointerEvent<HTMLDivElement>) => { |
| 40 | event.preventDefault(); |
no outgoing calls
no test coverage detected