An implementation of the ILabelStyleRenderer interface that can render TemplateLabelStyleBase instances.
Type Details
- yfiles module
- styles-template
- yfiles-umd modules
- All view modules
- Legacy UMD name
- yfiles.styles.TemplateLabelStyleRenderer
See Also
Properties
Gets or sets the currently configured label.
Gets or sets the currently configured style.
Methods
Stores the layout.
Remarks
Creates the visual by delegating to createTemplate and then initializing the control with the context.
Parameters
A map of options to pass to the method.
- context - IRenderContext
- The context for the creation.
Returns
- ↪Visual
- The visual that is used for rendering the label.
See Also
Implements
Returns a tight rectangular area where the whole rendering would fit into.
Remarks
Parameters
A map of options to pass to the method.
- context - ICanvasContext
- the context to calculate the bounds for
Returns
Implements
Configures the style and label properties, calls configure and returns this
.
Parameters
A map of options to pass to the method.
- label - ILabel
- The label to retrieve the bounds provider for. The value will be stored in the label property.
- style - ILabelStyle
- The style to associate with the label. The value will be stored in the style property.
Returns
- ↪IBoundsProvider
this
See Also
Implements
Configures the style and label properties, does not call configure and returns this
.
Remarks
this
or an instance that depends on a correctly configured this
.Parameters
A map of options to pass to the method.
- label - ILabel
- The label to query the context for. The value will be stored in the label property.
- style - ILabelStyle
- The style to associate with the label. The value will be stored in the style property.
Returns
- ↪ILookup
this
See Also
Implements
Configures the style and label properties, calls configure and returns this
.
Parameters
A map of options to pass to the method.
- label - ILabel
- The label to query hit test with. The value will be stored in the label property.
- style - ILabelStyle
- The style to associate with the label. The value will be stored in the style property.
Returns
- ↪IHitTestable
this
See Also
Implements
Configures the style and label properties, calls configure and returns this
.
Parameters
A map of options to pass to the method.
- label - ILabel
- The label to query marquee intersection tests. The value will be stored in the label property.
- style - ILabelStyle
- The style to associate with the label. The value will be stored in the style property.
Returns
- ↪IMarqueeTestable
this
See Also
Implements
Gets the normalized outline by delegating to normalizedOutline.
Calculates the preferred size for the given label and style.
Parameters
A map of options to pass to the method.
- label - ILabel
- The label instance.
- style - ILabelStyle
- The style instance to apply.
Returns
- ↪Size
- The preferred size for the given label and style.
See Also
Implements
Gets the size of the preferred for the current configuration using the provided context.
Parameters
A map of options to pass to the method.
- context - IRenderContext
- The render context.
Calculates the preferred size for the given label and style.
Parameters
A map of options to pass to the method.
- context - IRenderContext
- label - ILabel
- The label instance.
- style - ILabelStyle
- The style instance to apply.
Returns
- ↪Size
- The preferred size for the given label and style.
See Also
Configures the style and label properties, does not call configure and returns this
.
Remarks
Configure
in isVisible.Parameters
A map of options to pass to the method.
- label - ILabel
- The label to query visibility tests. The value will be stored in the label property.
- style - ILabelStyle
- The style to associate with the label. The value will be stored in the style property.
Returns
- ↪IVisibilityTestable
this
See Also
Implements
Configures the style and label properties, calls configure and returns this
.
Parameters
A map of options to pass to the method.
- label - ILabel
- The label to retrieve the IVisualCreator for. The value will be stored in the label property.
- style - ILabelStyle
- The style to associate with the label. The value will be stored in the style property.
Returns
- ↪IVisualCreator
this
See Also
Implements
Delegates to the TemplateLabelStyleBase's autoFlip property.
Determines if something has been hit at the given coordinates in the world coordinate system.
Remarks
Parameters
A map of options to pass to the method.
- context - IInputModeContext
- the context the hit test is performed in
- location - Point
- the coordinates in world coordinate system
Returns
- ↪boolean
- whether something has been hit
Implements
Returns true
if the corresponding item is considered to intersect the given rectangular box.
Remarks
This method may return false
if the item cannot be selected using a selection marquee or optionally if the item is only partially contained within the box.
Implementations should respect the hitTestRadius if marquee selections should behave differently on different zoom levels.
Parameters
A map of options to pass to the method.
- context - IInputModeContext
- the current input mode context
- rectangle - Rect
- the box describing the marquee's bounds
Returns
- ↪boolean
true
if the item is considered to be captured by the marquee
Implements
Uses the layout to determine whether the clip intersects.
Parameters
A map of options to pass to the method.
- context - ICanvasContext
- The context to determine the visibility for.
- rectangle - Rect
- The visible region clip.
Returns
- ↪boolean
false
if and only if it is safe not to paint the element because it would not affect the given clipping region.
Implements
Delegates to the contextLookup of the ILabelStyle.
Type Parameters
- T: any
Parameters
A map of options to pass to the method.
- type - Class<T>
- The type to query an instance for.
Returns
- ↪T
- The implementation or
null
.
See Also
Implements
Delegates to the TemplateLabelStyleBase's contextLookup.
Parameters
A map of options to pass to the method.
- style - TemplateLabelStyleBase
- The style to look up the context for.
- label - ILabel
- The current label.
- type - Class
- The type to look up.
Returns
- ↪any
- The result from the context or
null
.
Updates the visual correspondingly.
Parameters
A map of options to pass to the method.
- context - IRenderContext
- The context for the creation.
- oldVisual - Visual
- The currently rendered visual.
Returns
- ↪Visual
- The visual that is used for rendering the label.