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

stop drag from outside #787

Open
cherepanov opened this issue Nov 6, 2022 · 3 comments
Open

stop drag from outside #787

cherepanov opened this issue Nov 6, 2022 · 3 comments

Comments

@cherepanov
Copy link

Environments

  • Framework name: React
  • Moveable Component version: 0.41.0

Description

I need API to force stop any kind of transforms and fire onDragEnd like it was initiated by user.
In my case container for Moveable located next to iframe and then mouse leaves container no more events fired until mouse back to container. Whilst Moveable kept in dragging state. Snappable with bounds works the same way.

My previous approach was to handle mouseLeave event on container and fire dragEnd on MoveableManager and ables.
With latest version It still works, but exception occurs from Gesto subscriptions probably because something left in intermediate state.

related #648

@cherepanov
Copy link
Author

@daybrush daybrush added this to the 0.39.0 milestone Nov 7, 2022
daybrush added a commit that referenced this issue Nov 13, 2022
@daybrush
Copy link
Owner

@cherepanov

  • @moveable/helper 0.0.4
  • lit-moveable 0.16.0
  • moveable 0.39.0
  • preact-moveable 0.41.0
  • react-compat-moveable 0.27.0
  • react-moveable 0.42.0
  • svelte-moveable 0.31.0
  • vue-moveable 2.0.0-beta.48
  • vue3-moveable 0.14.0
  • ngx-moveable 0.36.0

moveable's new version is released.
stopDrag method is added. Use this. Thank you :)

@cherepanov
Copy link
Author

@daybrush Thx a lot!

See no issue so far:
https://codesandbox.io/s/sad-fast-m5luuh?file=/src/App.tsx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants