Skip to main content

DragTargetEvent

Event payload for drag move and accepted-drop callbacks.

Inherits: Event

Properties

  • global_position - Pointer position in the global coordinate space.
  • local_position - Pointer position relative to the target bounds.
  • offset - Pointer position in global coordinates.
  • src - Source Draggable control resolved from src_id.
  • src_id - ID of the Draggable source control, if available.
  • x - Horizontal pointer position in the global coordinate space.
  • y - Vertical pointer position in the global coordinate space.

Properties

global_positionclass-attributeinstance-attribute

global_position: Offset = field(metadata={'data_field': 'g'})

Pointer position in the global coordinate space.

local_positionclass-attributeinstance-attribute

local_position: Offset = field(metadata={'data_field': 'l'})

Pointer position relative to the target bounds.

offsetdeprecatedproperty

offset: Offset
Deprecated

Deprecated since version 0.85.0 and scheduled for removal in 0.88.0. Use local_position for target-relative coordinates or global_position for global coordinates instead.

Pointer position in global coordinates.

srcclass-attributeinstance-attribute

src: Draggable = field(init=False)

Source Draggable control resolved from src_id.

src_idinstance-attribute

src_id: Optional[int]

ID of the Draggable source control, if available.

xdeprecatedproperty

x: float
Deprecated

Deprecated since version 0.85.0 and scheduled for removal in 0.88.0. Use local_position.x for target-relative coordinates or global_position.x for global coordinates instead.

Horizontal pointer position in the global coordinate space.

ydeprecatedproperty

y: float
Deprecated

Deprecated since version 0.85.0 and scheduled for removal in 0.88.0. Use local_position.y for target-relative coordinates or global_position.y for global coordinates instead.

Vertical pointer position in the global coordinate space.