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

Allow drag start condition customization #1087

Open
csisy-bt4w opened this issue Jul 3, 2024 · 0 comments
Open

Allow drag start condition customization #1087

csisy-bt4w opened this issue Jul 3, 2024 · 0 comments

Comments

@csisy-bt4w
Copy link

csisy-bt4w commented Jul 3, 2024

We want to only allow dragging by the left mouse button and not the other ones.

Currently, we have no way to stop a draggable element to enter the dragging state.

_dragStart(e: ElementEvent) {

Possible solutions:

  • Emit the event first, then check if the event was cancelled by the handler or not.
  • Provide a separate callback that receives the event and returns a boolean
  • Allow the draggable property to be a function as well which receives the event and returns the currently known results (boolean | 'horizontal' | 'vertical')
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

No branches or pull requests

1 participant