C

CustomEdgeProvider
abstract

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

Show:

Constructors

Initializes a new instance of the CustomEdgeProvider class.

protected

Parameters

Methods

This will be called once after the export is finished and shall clear any state created during the export, especially maps containing masters or style sheets for reuse.

Note that a master or style sheet is only valid for the same export run it was created.

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.

protected

Parameters

edge: IEdge

The edge.

context: MasterProviderContext

The context.

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.

protected

Parameters

label: ILabel

The label.

context: MasterProviderContext

The context.

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.

protected

Parameters

node: INode

The node.

context: MasterProviderContext

The context.

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.

protected

Parameters

port: IPort

The port.

context: MasterProviderContext

The context.

Override this method to create the VSDX styles for a yFiles edge style.

abstract

Parameters

edge: IEdge

The edge to create the styles for

context: MasterProviderContext

The context.

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.