An implementation of the ISnapReferenceProvider interface that provides SnapReferences for ILabels.
Remarks
Type Details
- yFiles module
- view
Constructors
Methods
Adds snap lines to the context
that are parallel to the path segments of the owner edge at particular distances.
Remarks
context
specify which snap lines are actually created.Parameters
A map of options to pass to the method.
- context - GraphSnapContext
- The snap context which manages the snap lines and the settings. Note that implementations should not change the state of the context explicitly.
- evt - CollectSnapReferencesEventArgs
- The context of the input mode that handles the dragging.
addEdgePathSnapLines
(context: GraphSnapContext, evt: CollectSnapReferencesEventArgs, distance: number)Adds snap lines to the context
that are parallel to the path segments of the owner edge at the given distance.
Remarks
Parameters
A map of options to pass to the method.
- context - GraphSnapContext
- The snap context which manages the snap lines and the settings. Note that implementations should not change the state of the context explicitly.
- evt - CollectSnapReferencesEventArgs
- The context of the input mode that handles the dragging.
- distance - number
- The distance of the added snap lines from the edge path.
Adds two snap lines for the initial center location of the label, one in the direction of the up vector, and the other orthogonal to that direction.
Remarks
Parameters
A map of options to pass to the method.
- context - GraphSnapContext
- The snap context which manages the snap lines and the settings. Note that implementations should not change the state of the context explicitly.
- evt - CollectSnapReferencesEventArgs
- The context of the input mode that handles the dragging.
Adds snap lines to the context
that are parallel to the owner node's border at particular distances.
Remarks
context
specify which snap lines are actually created.Parameters
A map of options to pass to the method.
- context - GraphSnapContext
- The snap context which manages the snap lines and the settings. Note that implementations should not change the state of the context explicitly.
- evt - CollectSnapReferencesEventArgs
- The context of the input mode that handles the dragging.
Adds horizontal and vertical snap lines to the context
that are originating from the label's owner port if the label's owner is a port.
Remarks
context
is set to true
.Parameters
A map of options to pass to the method.
- context - GraphSnapContext
- The snap context which manages the snap lines and the settings. Note that implementations should not change the state of the context explicitly.
- evt - CollectSnapReferencesEventArgs
- The context of the input mode that handles the dragging.
Called by the GraphSnapContext when a drag is about to start.
Remarks
context
configuration to addEdgePathSnapLines , addNodeShapeSnapLines, or addPortSnapLines.Parameters
A map of options to pass to the method.
- context - GraphSnapContext
- The context which holds the settings for the snap lines. Note that implementations should not change the state of the context explicitly.
- evt - CollectSnapReferencesEventArgs
- The argument to use for adding snap lines.
Implements
Fields
The label this provider was created for.