Skip to content

Allow drag start condition customization #1087

Description

@csisy-bt4w

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')

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions