-
-
Notifications
You must be signed in to change notification settings - Fork 219
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
fix: drawer failing to cancel move event #339
Conversation
@rortan134 is attempting to deploy a commit to the emil Team on Vercel. A member of the Team first needs to authorize it. |
|
||
React.useEffect(() => { | ||
// Trigger enter animation without using CSS animation | ||
setVisible(true); | ||
}, []); | ||
|
||
const isDeltaInDirection = (delta: { x: number; y: number }, direction: DrawerDirection, threshold = 0) => { | ||
function isDeltaInDirection(delta: { x: number; y: number }, direction: DrawerDirection, threshold = 0) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changed to regular function for the sake of consistency
src/index.tsx
Outdated
onPointerOut={handleOnPointerUp} | ||
onContextMenu={handleOnPointerUp} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to forward the events to these too
I think the events are not being forwarded yet. I'm talking specifically about this line rest.onPointerUp?.(event); We need to rest.onPointerOut?.(event)
rest.onContextMenu?.(event) depending on the prop |
Added in #440 due to too many merge conflicts, it's my bad that I didn't merge this earlier. Thanks for your contribution though! |
Closes #279