Provides functionality to hide and unhide partitions of nodes and their adjacent edges of a graph temporarily for algorithmic operations.
This class can be used to temporarily hide away certain elements of a graph and to unhide that parts at a later time again. Instances of this class keep track of graph elements that were hidden from a graph in order to make them visible again at a later time.
Note that this class should not be used to hide elements from a Graph2D for pure hiding purposes. Since this class will by default prevent the graph instance from firing events, other code might cease to work correctly. Use this class for short term removal of nodes and edges, only.
- yfiles module
- algorithms
- yfiles-umd modules
- All layout modules,
view-layout-bridge
- Legacy UMD name
- yfiles.algorithms.GraphPartitionManager
Instantiates a new GraphPartitionManager for the given graph.
All non-static hiding and unhiding methods will refer to the given graph.
Gets the Graph
for which this partition manager was created.
Assures that only nodes are visible in the graph that are associated with the given partitionId.
options - Object
A map of options to pass to the method.
- partitionId - Object
the partitionId for the nodes that will be made visible
Hides the given node and all it's adjacent edges from the graph.
The hidden elements will be stored so that they can be unhidden again at a later time.
Hides the given edge from the graph.
The hidden edge will be stored so that they can be unhidden again at a later time.
Hides the given list of edges from the graph.
The hidden edges will be stored so that they can be unhidden again at a later time.
Hides the given list of nodes from the graph.
The hidden nodes and adjacent edges will be stored so that they can be unhidden again at a later time.
Hides all nodes and edges from this graph.
The hidden elements will be stored so that they can be unhidden again at a later time.
Hides the given edges from the graph.
The hidden edges will be stored so that they can be unhidden again at a later time.
Hides all edges from this graph.
The hidden edges will be stored so that they can be unhidden again at a later time.
Hides the given elements from the graph.
The hidden nodes and adjacent edges will be stored so that they can be unhidden again at a later time.
Hides multiple edges from the graph.
If there are multiple edges connecting two nodes then all but one (representative) of these edges will be hidden. The hidden edges will be stored so that they can be unhidden again at a later time.
Hides the given nodes from the graph.
The hidden nodes and adjacent edges will be stored so that they can be unhidden again at a later time.
Hides nodes and adjacent edges that have the given partitionId associated.
options - Object
A map of options to pass to the method.
- partitionId - Object
the id
Hides all self-loop edges from this graph.
The hidden edges will be stored so that they can be unhidden again at a later time.
Initializes internal data structures using the new DataProvider.
This method must also be called whenever the content of the given DataProvider changes.
options - Object
A map of options to pass to the method.
- partitionId - IDataProvider
the data provider that holds the partitionIds for all elements.
Hides all self-loops and multiple edges from the graph.
The overall effect of this method is that the minimum number of edges are hidden from the graph such that it contains no self-loops and no multiple edges anymore. The hidden edges will be stored so that they can be unhidden again at a later time.
This method will be called whenever the partition manager is requested to unhide the given edge from the graph.
This method will be called whenever the partition manager is requested to unhide the given node from the graph.
Unhides all formerly hidden elements in the graph.
Unhides all formerly hidden edges in the graph.
- Both source or target node of all such edges must be contained in the graph.
Unhides all formerly hidden nodes in the graph.
Note that this method does not unhide hidden edges.
Unhides nodes that have the given partitionId associated.
options - Object
A map of options to pass to the method.
- partitionId - Object
the id