PointerTracking enum

Defines how an element tracks the pointer during drag operations, particularly when the pointer moves outside the editor bounds.

This enum controls the behavior of draggable elements (nodes, annotations, connections) when the pointer exits the visible viewport area.

Inheritance
Available extensions

Values

free → const PointerTracking

Element tracks pointer position freely, even outside editor bounds.

Use this for elements that should follow the pointer exactly, like connection endpoints during creation. The element position is always calculated from the current pointer position.

Example: Connection dragging where the endpoint should always be directly under (or offset from) the pointer.

anchored → const PointerTracking

Element anchors at the boundary edge when pointer exits bounds, then resyncs to pointer position when it returns.

Use this for positioned elements like nodes and annotations that should stay visible in the viewport. When the pointer goes outside:

  1. Element position freezes (doesn't follow pointer outside)
  2. Autopan continues to reveal more canvas
  3. When pointer re-enters, element snaps to match pointer position

Example: Node dragging where the node should remain visible while autopan reveals the destination area.

Properties

hashCode int
The hash code for this object.
no setterinherited
index int
A numeric identifier for the enumerated value.
no setterinherited
name String

Available on Enum, provided by the EnumName extension

The name of the enum value.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Constants

values → const List<PointerTracking>
A constant List of the values in this enum, in order of their declaration.