Provides the snap lines and the snap results to the LabelSnapContext during dragging of labels.
Type Details
- yfiles module
- view-component
- yfiles-umd modules
- All view modules
- Legacy UMD name
- yfiles.input.ILabelSnapContextHelper
See Also
Methods
Called during initialization of a label
dragging to add snap lines to which the label can potentially snap to the snapContext
.
Parameters
A map of options to pass to the method.
- snapContext - LabelSnapContext
- The snap context which manages the snap lines and the settings. Note that implementations should not change the state of the context explicitly.
- inputModeContext - IInputModeContext
- The context of the input mode that handles the dragging.
- label - ILabel
- The label that is dragged.
collectSnapResults
(context: LabelSnapContext, evt: CollectSnapResultsEventArgs, suggestedLayout: IOrientedRectangle, label: ILabel)Called while the given label
is dragged to add snap results for the snap lines provided by the context
.
Parameters
A map of options to pass to the method.
- context - LabelSnapContext
- The snap context which manages the snap lines and the settings.
- evt - CollectSnapResultsEventArgs
- The event argument to obtain the necessary information from and add results to.
- suggestedLayout - IOrientedRectangle
- The layout of the label that would be used without snapping.
- label - ILabel
- The label that is dragged.
Static Methods
Creates an implementation of the interface ILabelSnapContextHelper from the given definition.
Remarks
Parameters
A map of options to pass to the method.
- addSnapLines - function(LabelSnapContext, IInputModeContext, ILabel):void
Called during initialization of a
label
dragging to add snap lines to which the label can potentially snap to thesnapContext
.This property holds the implementation for addSnapLines.
- collectSnapResults - function(LabelSnapContext, CollectSnapResultsEventArgs, IOrientedRectangle, ILabel):void
Called while the given
label
is dragged to add snap results for the snap lines provided by thecontext
.This property holds the implementation for collectSnapResults.
Returns
- ↪ILabelSnapContextHelper
- An instance of the ILabelSnapContextHelper interface based on the given definition.