Open
Description
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.
zrender/src/mixin/Draggable.ts
Line 45 in 4bcc023
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'
)
Metadata
Metadata
Assignees
Labels
No labels