Bugfix on useShapeEvents wrong key name (#459)

* onPointShape called instead of onPointerDown

* Update useShapeEvents.tsx

* Bugfix on useShapeEvents wrong key name

Co-authored-by: Steve Ruiz <steveruizok@gmail.com>
This commit is contained in:
Thomas Mathisen 2021-12-22 13:56:49 +01:00 committed by GitHub
parent 9b7414509f
commit 4cf283e84f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -60,7 +60,7 @@ export function useShapeEvents(id: string) {
callbacks.onReleaseShape?.(info, e)
callbacks.onPointerUp?.(info, e)
},
onPointerEnter: (e: React.PointerEvent) => {
onPointerMove: (e: React.PointerEvent) => {
if (!inputs.pointerIsValid(e)) return
e.stopPropagation()
@ -75,7 +75,7 @@ export function useShapeEvents(id: string) {
callbacks.onPointerMove?.(info, e)
},
onPointerMove: (e: React.PointerEvent) => {
onPointerEnter: (e: React.PointerEvent) => {
if (!inputs.pointerIsValid(e)) return
const info = inputs.pointerEnter(e, id)
callbacks.onHoverShape?.(info, e)