NodeRotationConfig
Configuration for node rotation behavior.
Properties
Section titled “Properties”computeSnapAngleForNode()
Section titled “computeSnapAngleForNode()”computeSnapAngleForNode: (
node) =>null|number
Computes the snap angle for a node’s rotation.
Parameters
Section titled “Parameters”The node to compute the snap angle for.
Returns
Section titled “Returns”null | number
The angle in degrees to snap to, or null if default snapping should be used.
Default
Section titled “Default”() => nulldefaultRotatable
Section titled “defaultRotatable”defaultRotatable:
boolean
The default rotatable state for nodes.
Default
Section titled “Default”truedefaultSnapAngle
Section titled “defaultSnapAngle”defaultSnapAngle:
number
The default snap angle in degrees. Used if computeSnapAngleForNode returns null.
Default
Section titled “Default”30shouldSnapForNode()
Section titled “shouldSnapForNode()”shouldSnapForNode: (
node) =>boolean
Determines if rotation snapping should be enabled for a node.
Parameters
Section titled “Parameters”The node to check for rotation snapping.
Returns
Section titled “Returns”boolean
True if rotation should snap, false otherwise.
Default
Section titled “Default”() => false