DraggingOptions class

New in 2.0, this class contains options for dragging and moving parts.

This is used by Diagram#moveParts, Diagram#computeMove, and DraggingTool#computeMove.

Both the Diagram and its DraggingTool have a DraggingOptions instance. Typically, only the DraggingTool one is used, unless the Diagram has no DraggingTool defined.

In typical DraggingTool operation you do not need to create or modify a DraggingOptions instance. Setting properties on the DraggingTool such as DraggingTool#isGridSnapEnabled sets the value on the DraggingTool#dragOptions instance for you.

Available extensions
Annotations
  • @JS()
  • @staticInterop

Constructors

DraggingOptions()
factory

Properties

Available on DraggingOptions, provided by the DraggingOptions$Typings extension

Gets or sets whether the user can move a single Link, disconnecting it from connected nodes and possibly connecting it to valid ports. By default this property is false.
getter/setter pair
dragsMembers bool

Available on DraggingOptions, provided by the DraggingOptions$Typings extension

Determines whether dragging a Group also drags its member Parts if there is no Group.placeholder. By default this property is true.
getter/setter pair
dragsTree bool

Available on DraggingOptions, provided by the DraggingOptions$Typings extension

Gets or sets whether moving or copying a node also includes all of the node's tree children and their descendants, along with the links to those additional nodes. By default this property is false.
getter/setter pair
gridSnapCellSize Size

Available on DraggingOptions, provided by the DraggingOptions$Typings extension

Gets or sets the size of the grid cell used when snapping during a drag. By default this property is the Size(NaN, NaN), which causes this tool to use the Panel#gridCellSize value of the Diagram#grid.
getter/setter pair
gridSnapCellSpot Spot

Available on DraggingOptions, provided by the DraggingOptions$Typings extension

Gets or sets the Spot that specifies what point in the grid cell dragged parts snap to, if the value of #isGridSnapEnabled is true. By default this property is Spot.TopLeft.
getter/setter pair
gridSnapOrigin Point

Available on DraggingOptions, provided by the DraggingOptions$Typings extension

Gets or sets the snapping grid's origin point, in document coordinates, if the value of #isGridSnapEnabled is true. By default this property is the Point(NaN, NaN).
getter/setter pair
groupsAlwaysMove bool

Available on DraggingOptions, provided by the DraggingOptions$Typings extension

Determines whether or not Groups will ensure their member Parts always move, even if those member parts have Part#copyable and Part#movable set to false. By default this property is true.
getter/setter pair
groupsSnapMembers bool

Available on DraggingOptions, provided by the DraggingOptions$Typings extension

Determines whether or not Groups will snap their member Parts in addition to themselves when moving. By default this property is false.
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
isGridSnapEnabled bool

Available on DraggingOptions, provided by the DraggingOptions$Typings extension

Whether or not the dragged parts snap to the Diagram#grid. By default this property is false.
getter/setter pair
isGridSnapRealtime bool

Available on DraggingOptions, provided by the DraggingOptions$Typings extension

If dragging with the DraggingTool, whether or not Parts snap to a grid (if applicable) in real-time, or only at the end of the dragging transaction. By default this property is true.
getter/setter pair
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