Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add type definitions of pointer event handlers #724

Merged
merged 2 commits into from
Feb 4, 2023
Merged

Add type definitions of pointer event handlers #724

merged 2 commits into from
Feb 4, 2023

Conversation

pastelmind
Copy link
Contributor

This PR adds type definitions of event handler props for pointer events:

  • onPointerDown
  • onPointerMove
  • onPointerUp
  • onPointerCancel
  • onPointerEnter
  • onPointerLeave
  • onPointerOver
  • onPointerOut
  • onPointerClick
  • onPointerDblClick
  • onGotPointerCapture
  • onLostPointerCapture

I checked most of them against Konva 8.4.0. However, I could not verify if the following events work properly:

  • pointercancel: Could not trigger this at all.
  • gotpointercapture: Works for shapes, but not Stage
  • lostpointercapture: Works for shapes, but not Stage

Though I believe that they can be fired in the right circumstances.

Resolves #717

@lavrton lavrton merged commit cad3803 into konvajs:master Feb 4, 2023
@lavrton
Copy link
Member

lavrton commented Feb 4, 2023

Thanks. Published.

@pastelmind pastelmind deleted the pointer-events branch February 5, 2023 03:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Type information missing for onPointer events
2 participants