An IVisualCreator for use in a GraphOverviewComponent that renders an IGraph instance using WebGL2.
Type Details
- yfiles module
- view-webgl
- yfiles-umd modules
- view-webgl, view
- Legacy UMD name
- yfiles.view.WebGL2GraphOverviewVisualCreator
Constructors
Properties
Gets or sets the overview edge style.
Gets or sets the overview group node style.
Gets or sets the overview node style.
Methods
This method is called by the framework to create a Visual that will be included into the IRenderContext.
Remarks
Parameters
A map of options to pass to the method.
- context - IRenderContext
- The context that describes where the visual will be used.
Returns
- ↪Visual
- The visual to include in the canvas object visual tree. This may be
null
.
See Also
Implements
getWebGL2EdgeStyle
(edge: IEdge) : WebGL2PolylineEdgeStyle | WebGL2ArcEdgeStyle | WebGL2BridgeEdgeStyleGets a WebGL2 edge style that is similar to the IEdgeStyle of the given edge
.
Remarks
Only WebGL2-specific edge style instances can be rendered. This method is used as a callback when an IEdge is added to the graph of this instance.
When a common edgeStyle is set, it is returned. Otherwise the associated style will be translated to a style that can be rendered by this instance and looks similar.
Note that specifically custom style implementations can benefit from a custom implementation that directly translates style instances to a corresponding WebGL2-based style.
Parameters
A map of options to pass to the method.
Returns
- ↪WebGL2PolylineEdgeStyle | WebGL2ArcEdgeStyle | WebGL2BridgeEdgeStyle
- A (possibly shared) instance of either a WebGL2PolylineEdgeStyles, WebGL2ArcEdgeStyle, or WebGL2BridgeEdgeStyle. Returning
null
will apply a default style instead.
getWebGL2GroupNodeStyle
(node: INode) : WebGL2ShapeNodeStyle | WebGL2IconNodeStyle | WebGL2GroupNodeStyleGets a WebGL2 group node style that is similar to the INodeStyle of the given node
.
Remarks
Only WebGL2-specific node style instances can be rendered. This method is used as a callback when a group INode is added to the graph of this instance.
When a common groupNodeStyle is set, it is returned. Otherwise the associated style will be translated to a style that can be rendered by this instance and looks similar.
Note that specifically custom style implementations and template-based styles can benefit from a custom implementation that directly translates style instances to a corresponding WebGL2-based style. Also note that an ImageNodeStyle is not automatically converted to a corresponding WebGL2IconNodeStyle since its image cannot be converted in synchronous code.
Parameters
A map of options to pass to the method.
Returns
- ↪WebGL2ShapeNodeStyle | WebGL2IconNodeStyle | WebGL2GroupNodeStyle
- A (possibly shared) instance of either a WebGL2ShapeNodeStyle, WebGL2IconNodeStyle, or WebGL2GroupNodeStyle. Returning
null
will apply a default style instead.
Gets a WebGL2 node style that is similar to the INodeStyle of the given node
.
Remarks
Only WebGL2-specific node style instances can be rendered. This method is used as a callback when an INode is added to the graph of this instance.
When a common nodeStyle is set, it is returned. Otherwise the associated style will be translated to a style that can be rendered by this instance and looks similar.
Note that specifically custom style implementations and template-based styles can benefit from a custom implementation that directly translates style instances to a corresponding WebGL2-based style. Also note that an ImageNodeStyle is not automatically converted to a corresponding WebGL2IconNodeStyle since its image cannot be converted in synchronous code.
Parameters
A map of options to pass to the method.
Returns
- ↪WebGL2ShapeNodeStyle | WebGL2IconNodeStyle | WebGL2GroupNodeStyle
- A (possibly shared) instance of either a WebGL2ShapeNodeStyle, WebGL2IconNodeStyle, or WebGL2GroupNodeStyle. Returning
null
will apply a default style instead.
This method updates or replaces a previously created Visual for inclusion in the IRenderContext.
Remarks
The CanvasComponent uses this method to give implementations a chance to update an existing Visual that has previously been created by the same instance during a call to createVisual. Implementation may update the oldVisual
and return that same reference, or create a new visual and return the new instance or null
.
I most cases oldVisual
is a visual instance that has been returned by the createVisual method of this instance. This is, however, not guaranteed. Implementations have to be aware of this.
Parameters
A map of options to pass to the method.
- context - IRenderContext
- The context that describes where the visual will be used in.
- oldVisual - Visual
- The visual instance to be updated.
Returns
- ↪Visual
oldVisual
, if this instance modified the visual, or a new visual that should replace the existing one in the canvas object visual tree.