Fixes events with shapes, adds test for selection

This commit is contained in:
Steve Ruiz 2021-06-23 15:39:14 +01:00
parent e265a85d7b
commit d5fe5612e1
13 changed files with 13504 additions and 81 deletions

View file

@ -54,8 +54,14 @@ export default function useCanvasEvents(
const handlePointerUp = useCallback((e: React.PointerEvent) => {
if (!inputs.canAccept(e.pointerId)) return
e.stopPropagation()
rCanvas.current.releasePointerCapture(e.pointerId)
state.send('STOPPED_POINTING', { id: 'canvas', ...inputs.pointerUp(e) })
state.send('STOPPED_POINTING', {
id: 'canvas',
...inputs.pointerUp(e, 'canvas'),
})
}, [])
const handleTouchStart = useCallback(() => {