A class for generating master providers for IEdges with custom IEdgeStyles.
Remarks
In general, the user has to only implement the abstract method createStyles which should return an object that determines the style of the edge. The path geometry is automatically created by EdgePathProcessingStep.
Members
Constructors
Initializes a new instance of the CustomEdgeProvider class.
Initializes a new instance of the CustomEdgeProvider class.
Parameters
- edgeStyleType: ClassConstructor<IEdgeStyle>
Methods
Note that a master or style sheet is only valid for the same export run it was created.
Defined in
CachingMasterProvider.clearcreateForEdge
(edge: IEdge, context: MasterProviderContext): Promise<ShapeStyleConfiguration>protectedThis method shall create an object containing a master and style sheets that will be cached
for later calls. You do not need to check if the item's style has the correct type.
createForEdge
(edge: IEdge, context: MasterProviderContext): Promise<ShapeStyleConfiguration>This method shall create an object containing a master and style sheets that will be cached for later calls. You do not need to check if the item's style has the correct type.
Parameters
- edge: IEdge
The edge.
- context: MasterProviderContext
The context.
Return Value
Overrides
CachingMasterProvider.createForEdgecreateForLabel
(label: ILabel, context: MasterProviderContext): Promise<ShapeStyleConfiguration> | ShapeStyleConfigurationprotectedThis method shall create an object containing a master and style sheets that will be cached
for later calls. You do not need to check if the item's style has the correct type.
createForLabel
(label: ILabel, context: MasterProviderContext): Promise<ShapeStyleConfiguration> | ShapeStyleConfigurationThis method shall create an object containing a master and style sheets that will be cached for later calls. You do not need to check if the item's style has the correct type.
Parameters
- label: ILabel
The label.
- context: MasterProviderContext
The context.
Return Value
Defined in
CachingMasterProvider.createForLabelcreateForNode
(node: INode, context: MasterProviderContext): Promise<ShapeStyleConfiguration> | ShapeStyleConfigurationprotectedThis method shall create an object containing a master and style sheets that will be cached
for later calls. You do not need to check if the item's style has the correct type.
createForNode
(node: INode, context: MasterProviderContext): Promise<ShapeStyleConfiguration> | ShapeStyleConfigurationThis method shall create an object containing a master and style sheets that will be cached for later calls. You do not need to check if the item's style has the correct type.
Parameters
- node: INode
The node.
- context: MasterProviderContext
The context.
Return Value
Defined in
CachingMasterProvider.createForNodecreateForPort
(port: IPort, context: MasterProviderContext): Promise<ShapeStyleConfiguration> | ShapeStyleConfigurationprotectedThis method shall create an object containing a master and style sheets that will be cached
for later calls. You do not need to check if the item's style has the correct type.
createForPort
(port: IPort, context: MasterProviderContext): Promise<ShapeStyleConfiguration> | ShapeStyleConfigurationThis method shall create an object containing a master and style sheets that will be cached for later calls. You do not need to check if the item's style has the correct type.
Parameters
- port: IPort
The port.
- context: MasterProviderContext
The context.
Return Value
Defined in
CachingMasterProvider.createForPortcreateStyles
(edge: IEdge, context: MasterProviderContext): Omit<ShapeStyleConfiguration, "master"> | Promise<Omit<ShapeStyleConfiguration, "master">>abstractOverride this method to create the VSDX styles for a yFiles edge style.
createStyles
(edge: IEdge, context: MasterProviderContext): Omit<ShapeStyleConfiguration, "master"> | Promise<Omit<ShapeStyleConfiguration, "master">>Override this method to create the VSDX styles for a yFiles edge style.
Parameters
- edge: IEdge
The edge to create the styles for
- context: MasterProviderContext
The context.
Return Value
See node.
See node.
See node.
See node.
Parameters
- label: ILabel
- context: MasterProviderContext
Return Value
Defined in
CachingMasterProvider.labelWill be called once for each node in the graph and shall return a VSDX Master and VSDX
StyleSheets or an empty Promise.
Will be called once for each node in the graph and shall return a VSDX Master and VSDX StyleSheets or an empty Promise.
When this method returns a value the propagation will be stopped and the returned master and styles are used for the shape representing this node. Otherwise, this node will be propagated through other IMasterProviders in the chain after this one.
Parameters
- node: INode
The node to create the master and styles for.
- context: MasterProviderContext
Return Value
- Promise<[ShapeStyleConfiguration, null]>
- A promise with an object containing a master and style sheets to stop the propagation or an empty promise.
Defined in
CachingMasterProvider.nodeSee node.
See node.