Skip to content

Allow drag start condition customization #1087

Open
@csisy-bt4w

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

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