- I
- I
Remarks
The ContextModificationStage can be used to temporarily hide, replace, or transfer data registered with the LayoutGraphContext using data keys. Common applications for this stage include applying multiple instances of the same ILayoutAlgorithm with e.g. different affected graph elements.
Context data can be hidden by this stage, in which case the coreLayout has no access to the data and resorts to the specified default behavior. Alternatively, the data can be replaced, in which case the coreLayout accesses the specified replacement data instead. In either case, all modifications to the context made by this stage are reversed after the coreLayout has returned.
The modifications to the context are applied in the same order in which they are added to this ContextModificationStage, so it is possible to, for example, transfer the data registered with one key to another and then hide the data on the original key afterward.
Default Values of Properties
| Name | Default |
|---|---|
| coreLayout | null |
Members
Constructors
Creates a new ContextModificationStage with the given algorithm as coreLayout or null if no core layout is specified.
null if no core layout is specified.Parameters
- coreLayout?: ILayoutAlgorithm
- the core layout algorithm
Properties
Gets or sets the core ILayoutAlgorithm that is wrapped by this stage.
Property Value
Default Value
Defined in
LayoutStageBase.coreLayoutGets or sets a value that determines whether this stage should do anything but execute the coreLayout.
By default, when constructed, stages should be enabled. Users may disable a stage's functionality by setting this property to false.
Stages that can guarantee that the graph will not change can choose to not even execute the coreLayout when disabled.
Defined in
LayoutStageBase.enabledMethods
Adds the specified keys as a pair of keys whose associated data should be transferred.
Parameters
- sourceKey: NodeDataKey<T>
- The key whose associated data should temporarily be transferred
- targetKey: NodeDataKey<T>
- The key to which the data should temporarily be transferred
Adds the specified keys as a pair of keys whose associated data should be transferred.
Parameters
- sourceKey: EdgeDataKey<T>
- The key whose associated data should temporarily be transferred
- targetKey: EdgeDataKey<T>
- The key to which the data should temporarily be transferred
Adds the specified keys as a pair of keys whose associated data should be transferred.
Parameters
- sourceKey: NodeLabelDataKey<T>
- The key whose associated data should temporarily be transferred
- targetKey: NodeLabelDataKey<T>
- The key to which the data should temporarily be transferred
Adds the specified keys as a pair of keys whose associated data should be transferred.
Parameters
- sourceKey: EdgeLabelDataKey<T>
- The key whose associated data should temporarily be transferred
- targetKey: EdgeLabelDataKey<T>
- The key to which the data should temporarily be transferred
Adds the specified key to the data keys whose associated data is temporarily hidden by this stage.
Parameters
- key: NodeDataKey<T>
- the key whose associated data should temporarily be hidden
Throws
- Exception ({ name: 'ArgumentError' })
- if the specified key is
null
Adds the specified key to the data keys whose associated data is temporarily hidden by this stage.
Parameters
- key: EdgeDataKey<T>
- the key whose associated data should temporarily be hidden
Throws
- Exception ({ name: 'ArgumentError' })
- if the specified key is
null
Adds the specified key to the data keys whose associated data is temporarily hidden by this stage.
Parameters
- key: NodeLabelDataKey<T>
- the key whose associated data should temporarily be hidden
Throws
- Exception ({ name: 'ArgumentError' })
- if the specified key is
null
Adds the specified key to the data keys whose associated data is temporarily hidden by this stage.
Parameters
- key: EdgeLabelDataKey<T>
- the key whose associated data should temporarily be hidden
Throws
- Exception ({ name: 'ArgumentError' })
- if the specified key is
null
Adds the specified layout data to be temporarily applied by this stage.
Parameters
- data: LayoutData<LayoutNode, LayoutEdge, LayoutNodeLabel, LayoutEdgeLabel>
- the layout data to be temporarily applied
Adds the specified key to the data keys whose associated data is temporarily replaced by this stage.
Parameters
- key: NodeDataKey<T>
- The key whose associated data should temporarily be replaced
- mapper: IMapper<LayoutNode, T>
- The mapper that should replace the data registered with the specified key
Throws
- Exception ({ name: 'ArgumentError' })
- If the specified key is
null
Adds the specified key to the data keys whose associated data is temporarily replaced by this stage.
Parameters
- key: EdgeDataKey<T>
- The key whose associated data should temporarily be replaced
- mapper: IMapper<LayoutEdge, T>
- The mapper that should replace the data registered with the specified key
Throws
- Exception ({ name: 'ArgumentError' })
- If the specified key is
null
Adds the specified key to the data keys whose associated data is temporarily replaced by this stage.
Parameters
- key: NodeLabelDataKey<T>
- The key whose associated data should temporarily be replaced
- mapper: IMapper<LayoutNodeLabel, T>
- The mapper that should replace the data registered with the specified key
Throws
- Exception ({ name: 'ArgumentError' })
- If the specified key is
null
Adds the specified key to the data keys whose associated data is temporarily replaced by this stage.
Parameters
- key: EdgeLabelDataKey<T>
- The key whose associated data should temporarily be replaced
- mapper: IMapper<LayoutEdgeLabel, T>
- The mapper that should replace the data registered with the specified key
Throws
- Exception ({ name: 'ArgumentError' })
- If the specified key is
null
Implementation of the ILayoutAlgorithm interface and main entry point for the layout calculation.
Parameters
- graph: LayoutGraph
- The graph to apply the layout to.