An implementation of the IPortStyleRenderer interface that can render TemplatePortStyleBase instances.
Type Details
- yfiles module
- styles-template
- yfiles-umd modules
- All view modules
- Legacy UMD name
- yfiles.styles.TemplatePortStyleRenderer
See Also
Properties
Gets the center of the port.
Gets or sets the currently configured port.
Gets or sets the currently configured style.
Methods
Prepares this instance for subsequent calls after the style and port have been initialized.
Remarks
Creates the visual by delegating to createTemplate and then initializing the visual 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 port.
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 port
parameters, calls configure and returns this
.
Parameters
A map of options to pass to the method.
- port - IPort
- The port to retrieve the bounds provider for. The value will be stored in the port property.
- style - IPortStyle
- The style to associate with the port. The value will be stored in the style property.
Returns
- ↪IBoundsProvider
this
See Also
Implements
Configures the style
and port
parameters, 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.
- port - IPort
- The port to query the context for. The value will be stored in the port property.
- style - IPortStyle
- The style to associate with the port. The value will be stored in the style property.
Returns
- ↪ILookup
this
See Also
Implements
Configures the style
and port
parameters, calls configure and returns this
.
Parameters
A map of options to pass to the method.
- port - IPort
- The port to query hit test with. The value will be stored in the port property.
- style - IPortStyle
- The style to associate with the port. The value will be stored in the style property.
Returns
- ↪IHitTestable
this
See Also
Implements
Configures the style
and port
parameters, calls configure and returns this
.
Parameters
A map of options to pass to the method.
- port - IPort
- The port to query marquee intersection tests. The value will be stored in the port property.
- style - IPortStyle
- The style to associate with the port. The value will be stored in the style property.
Returns
- ↪IMarqueeTestable
this
See Also
Implements
Gets the normalized outline by delegating to normalizedOutline.
Gets the size of the rendering from the style.
Returns
- ↪Size
- The renderSize.
Configures the style
and port
parameters, does not call configure and returns this
.
Remarks
Configure
in isVisible.Parameters
A map of options to pass to the method.
- port - IPort
- The port to query visibility tests. The value will be stored in the port property.
- style - IPortStyle
- The style to associate with the port. The value will be stored in the style property.
Returns
- ↪IVisibilityTestable
this
See Also
Implements
Configures the style
and port
parameters, calls configure and returns this
.
Parameters
A map of options to pass to the method.
- port - IPort
- The port to retrieve the IVisualCreator for. The value will be stored in the port property.
- style - IPortStyle
- The style to associate with the port. The value will be stored in the style property.
Returns
- ↪IVisualCreator
this
See Also
Implements
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
Returns true
if the corresponding item is considered to intersect the given path.
Remarks
This method may return false
if the item cannot be selected using a lasso selection or optionally if the item is only partially contained within the path.
Implementations should respect the hitTestRadius if lasso 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
- lassoPath - GeneralPath
- the path describing the lasso selection bounds
Returns
- ↪boolean
true
if the item is considered to be captured by the lasso
Implements
Calls configure and test the port using the style for a visible intersection with the clip bounds.
Remarks
Parameters
A map of options to pass to the method.
- context - ICanvasContext
- the current canvas context
- rectangle - Rect
- the clip bounds
Returns
- ↪boolean
true
if the port may be painted within the clip bounds.
See Also
Implements
Implements the ILookup interface.
Remarks
GetContext
. Subclass implementations should make sure to configure this instance before they return this
as a result of a successful lookup. This implementation will check if type.IsInstanceOfType(this)
and will call configure on success and return this
.Type Parameters
- T: any
Parameters
A map of options to pass to the method.
- type - Class<T>
- The type to query for.
Returns
- ↪T
- An implementation or
null
.
See Also
Implements
Delegates to the TemplatePortStyleBase's contextLookup.
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 port.