SnappingConfig
Configuration for node dragging behavior.
Properties
Section titled “Properties”computeSnapForNodeDrag()
Section titled “computeSnapForNodeDrag()”computeSnapForNodeDrag: (
node) =>null|Size
Computes the snap size for a node while dragging. If null is returned, a default snap size will be used.
Parameters
Section titled “Parameters”The node to compute the snap size for dragging.
Returns
Section titled “Returns”null | Size
The snap size for the node while dragging, or null.
Default
Section titled “Default”() => nullcomputeSnapForNodeSize()
Section titled “computeSnapForNodeSize()”computeSnapForNodeSize: (
node) =>null|Size
Computes the snap size for a node while resizing. If null is returned, a default snap size will be used.
Parameters
Section titled “Parameters”The node to compute the snap size for resizing.
Returns
Section titled “Returns”null | Size
The snap size for the node while resizing, or null.
Default
Section titled “Default”() => nulldefaultDragSnap
Section titled “defaultDragSnap”defaultDragSnap:
Size
The default snap size for node dragging.
Default
Section titled “Default”{ width: 10, height: 10 }defaultResizeSnap
Section titled “defaultResizeSnap”defaultResizeSnap:
Size
The default snap size for node resizing.
Default
Section titled “Default”{ width: 10, height: 10 }shouldSnapDragForNode()
Section titled “shouldSnapDragForNode()”shouldSnapDragForNode: (
node) =>boolean
Determines if a node should snap to grid while dragging.
Parameters
Section titled “Parameters”The node being dragged.
Returns
Section titled “Returns”boolean
True if the node should snap to grid, false otherwise.
Default
Section titled “Default”() => falseshouldSnapResizeForNode()
Section titled “shouldSnapResizeForNode()”shouldSnapResizeForNode: (
node) =>boolean
Determines if a node should snap to grid while resizing.
Parameters
Section titled “Parameters”The node being resized.
Returns
Section titled “Returns”boolean
True if the node should snap to grid, false otherwise.
Default
Section titled “Default”() => false