Remarks
Members
Constructors
graph, so dispose should be called if this instance is not used anymore.Parameters
- graph: IGraph
- The graph to wrap.
Properties
Gets a live view of all bends contained in this IGraph.
Gets a GraphDecorator instance for use with this graph.
Gets or sets the defaults for edges.
Implements
IGraph.edgeDefaultsGets a live view of all edge labels contained in this IGraph.
Defined in
IGraph.edgeLabelsGets a view of the edges contained in this graph.
This is a live view of the edges that always represents the current state of the graph. The same reference will be returned for each invocation.
Note that even though edges can be accessed via index, the underlying graph structure in the default IGraph implementation is a linked list and indexed access can be slow. In those cases it is recommended to store the edges in your own list, if possible. This is not necessary for the first or last element or when iterating over the edges via a foreach loop.
Implements
IGraph.edgesOverridden in
FilteredGraphWrapper.edgesCreates a GroupingSupport instance for the graph.
See Also
Developer's Guide
Defined in
IGraph.groupingSupportGets or sets the defaults for group nodes.
Implements
IGraph.groupNodeDefaultsGets a view of the labels contained in this graph.
This is a live view of the labels that always represents the current state of the graph. The same reference will be returned for each invocation.
Note that even though labels can be accessed via index, the underlying graph structure in the default IGraph implementation is a linked list and indexed access can be slow. In those cases it is recommended to store the labels in your own list, if possible. This is not necessary for the first or last element or when iterating over the labels via a foreach loop.
Implements
IGraph.labelsOverridden in
FilteredGraphWrapper.labelsGets or sets the defaults for normal nodes.
Implements
IGraph.nodeDefaultsGets a live view of all node labels contained in this IGraph.
Defined in
IGraph.nodeLabelsGets a view of the nodes contained in this graph.
This is a live view of the nodes that always represents the current state of the graph. The same reference will be returned for each invocation.
Note that even though nodes can be accessed via index, the underlying graph structure in the default IGraph implementation is a linked list and indexed access can be slow. In those cases it is recommended to store the nodes in your own list, if possible. This is not necessary for the first or last element or when iterating over the nodes via a foreach loop.
Implements
IGraph.nodesOverridden in
FilteredGraphWrapper.nodesGets a live view of all port labels contained in this IGraph.
Defined in
IGraph.portLabelsGets a view of the ports contained in this graph.
This is a live view of the ports that always represents the current state of the graph. The same reference will be returned for each invocation.
Note that even though ports can be accessed via index, the underlying graph structure in the default IGraph implementation is a linked list and indexed access can be slow. In those cases it is recommended to store the ports in your own list, if possible. This is not necessary for the first or last element or when iterating over the ports via a foreach loop.
Implements
IGraph.portsOverridden in
FilteredGraphWrapper.portsImplements
ITagOwner.tagGets or sets whether or not the UndoEngine used for this instance should be enabled.
Gets the graph that has been wrapped by this instance.
Property Value
See Also
Developer's Guide
Methods
The added instance will be returned.
To retrieve the current bends of an edge, use bends
Parameters
- edge: IEdge
- The edge to which the bend will be added.
- location: Point
- The coordinates to use for the newly created bend. To change the location after the bend has been added, use setBendLocation.
- index?: number
- The index for the newly added bend; A negative value (which is the default) indicates that the bend should be appended to the end of the list of bends.
Return Value
- IBend
- A newly created live bend
Implements
IGraph.addBendAdds bends with the given locations to the end of the bend list of the given edge.
Parameters
- edge: IEdge
- The edge to add the bends to.
- locations: IEnumerable<Point>
- The locations of the bends.
Throws
- Exception ({ name: 'ArgumentError' })
edgeis not in this graph.- Exception ({ name: 'ArgumentError' })
locationscontains one or more NaN values.
See Also
API
- addBend
Defined in
IGraph.addBendsAdds event handlers that propagate graph events from graph to listeners on this instance.
graph to listeners on this instance.Parameters
- graph: IGraph
- The graph for which event propagators should be created
Overridden in
FilteredGraphWrapper.addEventHandlersAdd a label to the given node or edge using the text as the initial label text and label model parameter, style, and tag.
Parameters
- owner: ILabelOwner
- The node, edge, or port to add the label to. Note that the owner cannot be changed after the label has been added.
- text: string
- The initial text of the label. To change the text after the label has been added, use setLabelText.
- layoutParameter?: ILabelModelParameter
- The label model parameter instance to use. If omitted the default parameter will be set. To change the parameter after the label has been added, use setLabelLayoutParameter.
- style?: ILabelStyle
- The style to use for the label. If omitted the default style will be set. To change the style after the label has been added, use setStyle.
- preferredSize?: Size
- The initial values to use for the preferredSize. If omitted size will be determined automatically. To change the preferred size after the label has been added, use setLabelPreferredSize.
- tag?: ILabel['tag']
- The initial tag to assign.
Return Value
- ILabel
- The newly created label.
Implements
IGraph.addLabelAdd a port to the given port owner using the location model parameter, style, and tag.
The locationParameter determines the location of the port.
An implementation may throw a NotSupportedError if the type of the owner instance does not support adding ports.
Parameters
- owner: IPortOwner
- the owner to add the port instance to.
- locationParameter?: IPortLocationModelParameter
- the parameter to use for the port to determine its location. If omitted, the default parameter will be set. To change the parameter after the port has been added, use setPortLocationParameter.
- style?: IPortStyle
- the style to initially assign to the style property. If omitted, the default style will be set, e.g. VOID_PORT_STYLE. To change the style after the port has been added, use setStyle.
- tag?: IPort['tag']
- the initial tag to assign.
Return Value
- IPort
- the newly created port
Implements
IGraph.addPortAdd a port to the given port owner using the absolute coordinates as the new initial position of the port anchor.
Parameters
- owner: IPortOwner
- The owner to add the port instance to.
- location: Point
- The location to use for the port to determine its location. This is passed to the createDefaultPortLocationParameter method to determine the initial IPortLocationModelParameter to use.
- style?: IPortStyle
- The style to initially assign to the style property, e.g. VOID_PORT_STYLE.
- tag?: IPort['tag']
- The initial tag to assign.
Return Value
- IPort
- The newly created port
Throws
- Exception ({ name: 'NotSupportedError' })
- If this instance cannot add a port to
owner. - Exception ({ name: 'ArgumentError' })
owneris not in this graph.- Exception ({ name: 'ArgumentError' })
locationcontains one or more NaN values.
See Also
Developer's Guide
API
- addPort, setPortLocation
Defined in
IGraph.addPortAtParameters
- node: INode
- The owner of the port.
- relativeLocation: Point
- The offset of the port relative to the center of the layout.
Return Value
- IPort
- The newly added port instance.
Throws
- Exception ({ name: 'ArgumentError' })
nodeis not in this graph.- Exception ({ name: 'ArgumentError' })
relativeLocationcontains one or more NaN values.
See Also
Defined in
IGraph.addRelativePortParameters
- undoName: string
- The name of the undo operation.
- redoName: string
- The name of the redo operation.
- undo: function
- The undo action.
- redo: function
- The redo action.
See Also
Developer's Guide
Defined in
IGraph.addUndoUnitMethod to adjust the size of a group node.
groupNode.Parameters
- groupNode: INode
- The group node to adjust the size of.
Throws
- Exception ({ name: 'ArgumentError' })
groupNodeis not in this graph.
Examples
// create a group node
const group = graph.createGroupNode()
// add some child nodes
graph.createNode(group, new Rect(10, 10, 30, 30))
graph.createNode(group, new Rect(50, 10, 30, 30))
graph.createNode(group, new Rect(50, 50, 30, 30))
// adjust the group node's layout to include all its children
graph.adjustGroupNodeLayout(group)AdjustGroupNodeLayout only affects the node it is called for. To properly adjust all of its ancestors, too, one has to adjust all of them from the given node to the root:for (const nodeToAdjust of graph.groupingSupport.getAncestors(
innermostGroup,
)) {
graph.adjustGroupNodeLayout(nodeToAdjust)
}See Also
Developer's Guide
API
- IGroupBoundsCalculator, INodeSizeConstraintProvider, calculateMinimumEnclosedArea, enlargeGroupNode, enlargeAllGroupNodes
Defined in
IGraph.adjustGroupNodeLayoutAdjusts the preferredSize property of a label to fit the suggested size of its ILabelStyleRenderer.
Parameters
- label: ILabel
- The label to adjust the size for.
See Also
Defined in
IGraph.adjustLabelPreferredSizeRuns an ILayoutAlgorithm synchronously on the given graph.
LayoutExecutor type is available at runtime.Parameters
- layout: ILayoutAlgorithm
- The layout.
- layoutData?: LayoutData<INode, IEdge, ILabel, ILabel>
- The layout data.
- stopDuration?: TimeSpan
- the maximum runtime for the layout calculation before it is automatically stopped.
- cancelDuration?: TimeSpan
- the maximum runtime for the layout calculation before it is automatically canceled.
- portAdjustmentPolicies?: ItemMapping<IPort, PortAdjustmentPolicy>
- The policy that specifies how port locations should be adjusted after a layout has been calculated.
- portPlacementPolicies?: ItemMapping<IPort, PortPlacementPolicy>
- The policy that specifies how ports should be placed by the layout algorithm.
- portLabelPolicies?: ItemMapping<ILabel, PortLabelPolicy>
- anchoredItems?: ItemMapping<IModelItem, LayoutAnchoringPolicy>
- Specifies which part of the items should be used to anchor the graph during layout.
- labelPlacementPolicies?: ItemMapping<ILabel, LabelPlacementPolicy>
- Sets how ILabels should be placed by the layout algorithm.
- nodeComparator?: function(INode, INode): number
- A comparison function that normalizes the order of the nodes for the layout calculation to ensure the same order for multiple layout invocations.
- edgeComparator?: function(IEdge, IEdge): number
- A comparison function that normalizes the order of the edges for the layout calculation to ensure the same order for multiple layout invocations.
See Also
Developer's Guide
API
- LayoutExecutor, applyLayoutAnimated
Defined in
IGraph.applyLayoutStarts an ICompoundEdit that records graph changes and custom undo units in a single compound unit.
Parameters
- undoName: string
- The undo name for the compound edit.
- redoName: string
- The redo name for the compound edit.
Return Value
See Also
Developer's Guide
Defined in
IGraph.beginEditStarts an ICompoundEdit that uses the memento design pattern to record changes to the items in the given items collection.
items collection.This method uses the IMementoSupport returned by the provider to record the state of an item at the beginning of the edit and when commit is called to create an IUndoUnit that can revert the item to the recorded state and back. If no provider is given, this method uses the IMementoSupport returned by the lookup implementation of the items to record the state of an item at the beginning of the edit and when commit is called to create an IUndoUnit that can revert the item to the recorded state and back.
Calling this method will immediately enqueue an IUndoUnit into the undo queue. Subsequent additions to the queue will be added after the created instance, even if they are added to the queue before the commit method has been called.
Parameters
- undoName: string
- redoName: string
- items: IEnumerable<T>
- The items that will be changed after this call and before the call to commit.
- provider?: function(T): IMementoSupport
- The provider for the IMementoSupport of the
items. if the provider returnsnullfor a given item, changes to this item are not being recorded.
Return Value
- ICompoundEdit
- An implementation of the ICompoundEdit interface whose commit or cancel methods need to be called after the items have been modified.
Examples
The following is an example implementation of an item that is being managed using IMementoSupport:
class Employee extends BaseClass<ILookup>(ILookup) implements ILookup {
_name: string
position: string
age: number
constructor(name: string, position: string, age: number) {
super()
this._name = name
this.position = position
this.age = age
}
get name(): string {
return this._name
}
// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-constraint
lookup<T extends any>(type: Constructor<any>): T | null {
if (type === IMementoSupport) {
return new EmployeeMementoSupport() as T
}
return null
}
}A collection of items from this type can then be watched using the following code snippet:
const edit = graph.beginEdit(
undoName,
redoName,
listWithMyEmployeesToWatch,
)
// changes to the employees are done here
if (!success) {
// if we don't want the changes to be done after all, then we need to cancel the edit
edit.cancel()
}Alternatively, when using a specific provider, consider the following examples. The following is an example implementation of an item that is being managed using IMementoSupport:
class SimpleEmployee {
private readonly _name: string
position: string
age: number
constructor(name: string, position: string, age: number) {
this._name = name
this.position = position
this.age = age
}
get name(): string {
return this._name
}
}A collection of items from this type can then be watched using the following code snippet, using the provider to return an appropriate IMementoSupport implementation:
const edit = graph.beginEdit(
undoName,
redoName,
listWithMyEmployeesToWatch,
(item) => new EmployeeMementoSupport(),
)
// changes to the employees are done here
if (!success) {
// if we don't want the changes to be done after all, then we need to cancel the edit
edit.cancel()
}Implementing the IMementoSupport interface is quite unrestrained, the type of the state returned by getState method can by anything as long as the applyState and stateEquals methods can deal with it:
class EmployeeMementoSupport
extends BaseClass<IMementoSupport>(IMementoSupport)
implements IMementoSupport
{
getState(subject: any): EmployeeState | null {
if (subject instanceof Employee) {
return new EmployeeState(subject.position, subject.age)
}
return null
}
applyState(subject: any, state: any): void {
if (subject instanceof Employee && state instanceof EmployeeState) {
subject.position = state.position
subject.age = state.age
}
}
stateEquals(state1: any, state2: any): boolean {
if (
state1 instanceof EmployeeState &&
state2 instanceof EmployeeState
) {
return (
state1.position === state2.position && state1.age === state2.age
)
}
return state1 === state2
}
}
class EmployeeState {
_position: string
_age: number
constructor(position: string, age: number) {
this._position = position
this._age = age
}
get position(): string {
return this._position
}
get age(): number {
return this._age
}
}In summary, use this concept when you want to track the state of items during certain operations for undo/redo. This is efficient if it's easier to handle an item's state than the changes to the item themselves. If you want to focus on the changes or on certain events, you should use custom IUndoUnit
See Also
Developer's Guide
API
- IMementoSupport
Defined in
IGraph.beginEditCalculates the preferred size of a label with the given properties.
Parameters
- owner: ILabelOwner
- The item that will own the label.
- text: string
- The text.
- layoutParameter?: ILabelModelParameter
- The label model parameter.
- style?: ILabelStyle
- The label style.
- tag?: ILabel['tag']
- The tag for the label.
Return Value
- Size
- The size as calculated by the ILabelStyleRenderer.
See Also
Defined in
IGraph.calculateLabelPreferredSizeRemoves all bends from the given edge.
Parameters
- owner: IEdge
- the edge whose bends will be removed
Throws
- Exception ({ name: 'ArgumentError' })
owneris not in this graph.
See Also
API
- remove, bend-removed, bends
Defined in
IGraph.clearBendsParameters
- labelOwner: ILabelOwner
- the owner whose labels will be removed
Throws
- Exception ({ name: 'ArgumentError' })
labelOwneris not in this graph.
See Also
API
- remove, label-removed, labels
Defined in
IGraph.clearLabelsParameters
- portOwner: IPortOwner
- the owner whose ports will be removed
Throws
- Exception ({ name: 'ArgumentError' })
portOwneris not in this graph.
See Also
API
- remove, port-removed, ports
Defined in
IGraph.clearPortsDetermines whether this graph contains the specified item.
Parameters
- item: IModelItem
- The item.
Return Value
- boolean
trueif this graph contains the specified item; otherwise,false.
Implements
IGraph.containsOverridden in
FilteredGraphWrapper.containscreateCompositeLayoutData
(items: LayoutData<INode, IEdge, ILabel, ILabel>): CompositeLayoutData<INode, IEdge, ILabel, ILabel>Returns an instance of CompositeLayoutData<TNode, TEdge, TNodeLabel, TEdgeLabel> that combines the given layout data instances.
createCompositeLayoutData
(items: LayoutData<INode, IEdge, ILabel, ILabel>): CompositeLayoutData<INode, IEdge, ILabel, ILabel>LayoutExecutor type is available at runtime.Parameters
- items: LayoutData<INode, IEdge, ILabel, ILabel>
- the layout data instances that should be combined into the created CompositeLayoutData<TNode, TEdge, TNodeLabel, TEdgeLabel>
Return Value
- CompositeLayoutData<INode, IEdge, ILabel, ILabel>
- an instance of CompositeLayoutData<TNode, TEdge, TNodeLabel, TEdgeLabel> that combines the given layout data instances.
Defined in
IGraph.createCompositeLayoutDataCreates the label layout parameter for a given ILabelOwner.
Parameters
- owner: ILabelOwner
- The item that is the owner of the label in question.
Return Value
- ILabelModelParameter
- The default label layout parameter to use for newly created labels at the item.
See Also
Defined in
IGraph.createDefaultLabelLayoutParametercreateDefaultPortLocationParameter
(owner: IPortOwner, location?: Point): IPortLocationModelParameterCreates a location model parameter for a newly created IPort at the owner that matches the location.
createDefaultPortLocationParameter
(owner: IPortOwner, location?: Point): IPortLocationModelParameterowner that matches the location.location is null, this method uses the port defaults for the owner to obtain the location parameter.Parameters
- owner: IPortOwner
- The owner of the port.
- location?: Point
- The location in the world coordinate system where the port should be added.
Return Value
- IPortLocationModelParameter
- Either a location model parameter that matches the location, or the default parameter to use for the IPortOwner as returned by getLocationParameterInstance.
Throws
- Exception ({ name: 'ArgumentError' })
locationcontains one or more NaN values.
See Also
Creates and returns an edge that connects to the given port instances.
Parameters
- sourcePort: IPort
- The source port the created edge will connect to. To change the source port after the edge has been created, use setEdgePorts.
- targetPort: IPort
- The target port the created edge will connect to. To change the target port after the edge has been created, use setEdgePorts.
- style?: IEdgeStyle
- The style instance that will be assigned to the newly created instance. This is done by reference. If omitted the default style will be set. To change the style after the edge has been created, use setStyle.
- tag?: IEdge['tag']
- The initial value of the tag that will be assigned to the new edge.
Return Value
- IEdge
- the newly created edge instance
Implements
IGraph.createEdgeCreates and returns an edge that connects to the given node instances using the given style instance.
Parameters
- source: INode
- The source node the created edge will connect to. It is up to the implementation to decide which port to use at the given node. An implementation may create a new port of the edge. To change the source port after the edge has been created, use setEdgePorts.
- target: INode
- The target node the created edge will connect to. It is up to the implementation to decide which port to use at the given node. An implementation may create a new port of the edge. To change the target port after the edge has been created, use setEdgePorts.
- style?: IEdgeStyle
- The style instance that will be assigned to the newly created instance. This is done by reference. If omitted the default style will be set. To change the style after the edge has been created, use setStyle.
- tag?: IEdge['tag']
- The initial value of the tag that will be assigned to the new edge.
Return Value
- IEdge
- the newly created edge instance
Implements
IGraph.createEdgeReturns an instance of LayoutData<TNode, TEdge, TNodeLabel, TEdgeLabel> that can be used to easily associate custom item-specific data with an IGraph.
LayoutExecutor type is available at runtime.Return Value
- GenericLayoutData<INode, IEdge, ILabel, ILabel>
- an instance of GenericLayoutData<TNode, TEdge, TNodeLabel, TEdgeLabel> that can be used to easily associate custom item-specific data with a
graph.
Defined in
IGraph.createGenericLayoutDataCreates a new group node using the provided style and layout as a child of parent.
parent.The group node will be a direct descendant of parent.
To create group nodes interactively use the GraphEditorInputMode as input mode and enable the grouping operations.
Parameters
- parent?: INode
- layout?: Rect
- The initial layout to use for the new node. If omitted the node will be placed with its top left corner at 0,0 and the default size. To change the layout after the group node has been created, use setNodeLayout.
- style?: INodeStyle
- The style to use for the new node. If omitted the default style will be set. To change the style after the group node has been created, use setStyle.
- tag?: INode['tag']
Return Value
- INode
- The newly created group node.
Implements
IGraph.createGroupNodeOverridden in
FilteredGraphWrapper.createGroupNodeCreates and returns a node using the specified values for the initial geometry, style, and tag.
Parameters
- layout: Rect
- The layout to use initially. The values will be copied to the node's layout field. To change the layout after the node has been created, use setNodeLayout.
- style?: INodeStyle
- The style instance that will be assigned to the newly created instance. This is done by reference. If omitted the default style will be set. To change the style after the node has been added, use setStyle.
- tag?: INode['tag']
- The initial value of the tag that will be assigned to the new node.
Return Value
- INode
- A newly created node instance
Implements
IGraph.createNodeCreates a new ordinary node as a direct descendant of parent using the given layout and style.
parent using the given layout and style.Parameters
- parent?: INode
- The node to use as the parent in the grouping hierarchy or
nullif the new node should become a top-level node. To change the parent after the group node has been created, use setParent. - layout?: Rect
- The layout to use initially. The values will be copied to the node's layout field. If omitted the default size will be set and the node's top left corner will be placed at 0,0. To change the layout after the group node has been created, use setNodeLayout.
- style?: INodeStyle
- The style instance that will be assigned to the newly created instance. This is done by reference. If omitted the default style will be set.
- tag?: INode['tag']
Return Value
- INode
- The newly created node.
Implements
IGraph.createNodeOverridden in
FilteredGraphWrapper.createNodeCreates and returns a node using the specified initial center location and style, as well as the tag.
Parameters
- location: Point
- the initial coordinates of the center of the node's layout property
- style?: INodeStyle
- The style instance that will be assigned to the newly created instance. This is done by reference.
- tag?: INode['tag']
- The initial value of the tag that will be assigned to the new node.
Return Value
- INode
- A newly created node instance
Throws
- Exception ({ name: 'ArgumentError' })
locationcontains one or more NaN values.
See Also
Developer's Guide
API
- node-created, createNode, setNodeCenter
Defined in
IGraph.createNodeAtCalculates the number of edges at the given IPortOwner for this graph.
Parameters
- owner: IPortOwner
- The port owner to count the degree of.
Return Value
- number
- The number of edges that are incident to the port owner.
Throws
- Exception ({ name: 'ArgumentError' })
owneris not in this graph.
See Also
Developer's Guide
API
- edgesAt
Defined in
IGraph.degreeParameters
- port: IPort
- The port owner to count the degree of.
Return Value
- number
- The number of edges that are incident to the port.
Throws
- Exception ({ name: 'ArgumentError' })
portis not in this graph.
See Also
Developer's Guide
API
- edgesAt
Defined in
IGraph.degreeOverridden in
FilteredGraphWrapper.disposeReturns an IListEnumerable<T> for the incoming, the outgoing, or all edges adjacent to the given port, depending on type.
type.If the given type is ALL, adjacent self-loops will appear twice in the returned enumerable. For INCOMING or OUTGOING, self-loops will only appear once.
Note that even though edges can be accessed via index, the underlying graph structure in the default IGraph implementation is a linked list and indexed access can be slow. In those cases, it is recommended to store the edges in your own list, if possible. This is not necessary for the first or last element or when iterating over the adjacent edges via a foreach loop.
Parameters
- port: IPort
- The port to check. The returned edges will have this port as a sourcePort or targetPort.
- type?: AdjacencyTypes
- The type of adjacency to consider. Default is ALL, which includes both incoming and outgoing edges.
Return Value
- IListEnumerable<IEdge>
- An enumeration of all adjacent edges of the given
type(incoming, outgoing, or both).
Implements
IGraph.edgesAtOverridden in
FilteredGraphWrapper.edgesAtReturns an IListEnumerable<T> for the incoming, the outgoing, or all edges adjacent to the given port owner, depending on type.
type.If the given type is ALL, adjacent self-loops will appear twice in the returned enumerable. For INCOMING or OUTGOING, self-loops will only appear once.
Note that even though edges can be accessed via index, the underlying graph structure in the default IGraph implementation is a linked list and indexed access can be slow. In those cases, it is recommended to store the edges in your own list, if possible. This is not necessary for the first or last element or when iterating over the adjacent edges via a foreach loop.
Parameters
- owner: IPortOwner
- The port to check. The returned edges will have one of the ports at this owner as a sourcePort or targetPort.
- type?: AdjacencyTypes
- The type of adjacency to consider. Default is ALL, which includes both incoming and outgoing edges.
Return Value
- IListEnumerable<IEdge>
- An enumeration of all adjacent edges of the given
type(incoming, outgoing, or both).
Implements
IGraph.edgesAtOverridden in
FilteredGraphWrapper.edgesAtReturns an enumerable over the children of the provided node.
This method returns the direct children, i.e. all nodes that have node as their parent. To get all descendants method getDescendants can be used.
To make a node a child of node, use setParent or create the node directly as a child with createNode
Parameters
- node: INode
- The node for which to return the children or
nullif the top-level nodes should be returned.
Return Value
- IListEnumerable<INode>
- All nodes that have
nodeas their parent.
Implements
IGraph.getChildrenOverridden in
FilteredGraphWrapper.getChildrenFinds an edge that connects from and to in the given graph.
from and to in the given graph.Parameters
- from: IPortOwner
- The sourcePort owner of the edge to find.
- to: IPortOwner
- The targetPort owner of the edge to find.
Return Value
- IEdge
- An edge that satisfies the constraints or
null, if none was found.
Throws
- Exception ({ name: 'ArgumentError' })
fromortoare not in this graph.
See Also
API
- edgesAt
Defined in
IGraph.getEdgeParameters
- sourcePort: IPort
- The sourcePort of the edge to find.
- targetPort: IPort
- The targetPort of the edge to find.
Return Value
- IEdge
- An edge that satisfies the constraints or
null, if none was found.
Throws
- Exception ({ name: 'ArgumentError' })
sourcePortortargetPortare not in this graph.
See Also
API
- edgesAt
Defined in
IGraph.getEdgeReturns the edges between the specified source and target owners.
directed to false.Parameters
- source: IPortOwner
- The owner from which the edges start.
- target: IPortOwner
- The owner at which the edges end.
- directed?: boolean
- Specifies whether to return only directed edges (default) or all edges regardless of direction.
Return Value
- IEnumerable<IEdge>
- An enumerable collection of edges connecting the
sourceto thetarget.
Defined in
IGraph.getEdgesBetweenReturns the edges between the specified source and target ports.
directed to false.Parameters
- sourcePort: IPort
- The port from which the edges start.
- targetPort: IPort
- The port at which the edges end.
- directed?: boolean
- Specifies whether to return only directed edges (default) or all edges regardless of direction.
Return Value
- IEnumerable<IEdge>
- An enumerable collection of edges connecting the
sourcePortto thetargetPort.
Defined in
IGraph.getEdgesBetweenParameters
- owner: ILabelOwner
- The item that the label defaults are returned for. If this is a group node, the groupNodeDefaults's label defaults will be returned, otherwise the nodeDefaults or edgeDefaults labels will be returned.
Return Value
- ILabelDefaults
- Appropriate ILabelDefaults for the provided
owner.
Defined in
IGraph.getLabelDefaultsParameters
- node: INode
- The node to retrieve the parent node for.
Return Value
- INode
- The parent node in this hierarchy or
nullifnodeis a top-level node.
Implements
IGraph.getParentOverridden in
FilteredGraphWrapper.getParentParameters
- owner: IPortOwner
- The item that the label defaults are returned for. If this is a group node, the groupNodeDefaults's port defaults will be returned, otherwise the nodeDefaults or edgeDefaults ports will be returned.
Return Value
- IPortDefaults
- Appropriate IPortDefaults for the provided
owner.
Defined in
IGraph.getPortDefaultsGroups the nodes in children into the provided group node.
children into the provided group node.parent needs to be a group node at the time of the invocation. This operation is basically the same as calling setParent for each node in children whose parent is not part of the set.// create some nodes
const children = []
for (let i = 0; i < 5; i++) {
children.push(graph.createNode())
}
// create a group node
const parent = graph.createGroupNode()
// add the nodes as children to the group
graph.groupNodes(parent, children)
// adjust the group node's layout to include all its children
graph.adjustGroupNodeLayout(parent)Parameters
- parent: INode
- The node to use as the parent in the grouping hierarchy.
- children: IEnumerable<INode>
- The children to group into the group node.
Throws
- Exception ({ name: 'ArgumentError' })
parentor one ofchildrenis not in this graph.
See Also
Developer's Guide
API
- groupNodes, setParent, createGroupNode
Defined in
IGraph.groupNodesGroups the nodes in children into a newly created group node.
children into a newly created group node.children.// create some nodes
const children = []
for (let i = 0; i < 5; i++) {
children.push(graph.createNode())
}
// create a group node and add the given nodes as children
const group = graph.groupNodes(children)
// adjust the group node's layout to include all its children
graph.adjustGroupNodeLayout(group)Parameters
- children: IEnumerable<INode>
- The children to group into the new group node.
- style?: INodeStyle
- The style for the new group node
- tag?: any
- The group node's tag
Return Value
- INode
- The newly created group node.
Throws
- Exception ({ name: 'ArgumentError' })
- One of
childrenis not in this graph.
See Also
Developer's Guide
API
- getNearestCommonAncestor, groupNodes
Defined in
IGraph.groupNodesCalculates the number of incoming edges at the given IPortOwner for this graph.
Parameters
- owner: IPortOwner
- The port owner to count the incoming edges of.
Return Value
- number
- The number of edges that have the port owner as their target port's owner.
Throws
- Exception ({ name: 'ArgumentError' })
owneris not in this graph.
See Also
Developer's Guide
API
- edgesAt
Defined in
IGraph.inDegreeParameters
- port: IPort
- The port to count the incoming edges of.
Return Value
- number
- The number of edges that have the port as their target port.
Throws
- Exception ({ name: 'ArgumentError' })
portis not in this graph.
See Also
Developer's Guide
API
- edgesAt
Defined in
IGraph.inDegreeReturns the incoming edges at the given owner.
This method delegates to edgesAt using INCOMING.
Note that even though edges can be accessed via index, the underlying graph structure in the default IGraph implementation is a linked list and indexed access can be slow. In those cases it is recommended to store the edges in your own list, if possible. This is not necessary for the first or last element or when iterating over the incoming edges via a foreach loop.
Parameters
- owner: IPortOwner
- The owner of the edges.
Return Value
- IListEnumerable<IEdge>
- An enumerable for the edges.
Throws
- Exception ({ name: 'ArgumentError' })
owneris not in this graph.
See Also
Developer's Guide
API
- edgesAt, outEdgesAt
Defined in
IGraph.inEdgesAtReturns the incoming edges at the given port.
This method delegates to edgesAt using INCOMING.
Note that even though edges can be accessed via index, the underlying graph structure in the default IGraph implementation is a linked list and indexed access can be slow. In those cases it is recommended to store the edges in your own list, if possible. This is not necessary for the first or last element or when iterating over the incoming edges via a foreach loop.
Parameters
- port: IPort
- The port of the edges.
Return Value
- IListEnumerable<IEdge>
- An enumerable for the edges.
Throws
- Exception ({ name: 'ArgumentError' })
portis not in this graph.
See Also
Developer's Guide
API
- edgesAt, outEdgesAt
Defined in
IGraph.inEdgesAtCauses the displays-invalidated event to be triggered.
Implements
IGraph.invalidateDisplaysReturns whether the given node is a group node.
Parameters
- node: INode
- The node to check.
Return Value
- boolean
- Whether the node is considered a group node.
Implements
IGraph.isGroupNodeOverridden in
FilteredGraphWrapper.isGroupNodenull implementations for the types, nor does it have to return the same instance any time. Also, it depends on the type and context whether the instance returned stays up to date or needs to be re-obtained for further use.Parameters
- type: Constructor<T>
- the type for which an instance shall be returned
Return Value
- T
- an instance that is assignable to the type or
null
Implements
ILookup.lookupEnumerates the neighbors of a given INode.
Parameters
- node: INode
- The node.
Return Value
- IEnumerable<INode>
- An enumerable over all neighbors.
Throws
- Exception ({ name: 'ArgumentError' })
nodeis not in this graph.
See Also
Developer's Guide
API
- edgesAt
Defined in
IGraph.neighborsRaises the bend-added event.
Raises the bend-location-changed event
Raises the bend-removed event.
Raises the bend-tag-changed event.
Raises the edge-created event.
Raises the edge-ports-changed event.
Raises the edge-removed event.
Raises the edge-style-changed event.
Raises the edge-tag-changed event.
Called when the wrappedGraph property value changes and after initialization of the field.
Raises the graph-tag-changed event.
Raises the displays-invalidated event
Dispatches the is-group-node-changed event.
Raises the label-added event.
Raises the label-layout-parameter-changed event.
Parameters
- evt: ItemChangedEventArgs<ILabel, ILabelModelParameter>
- The parameters for the event.
Raises the label-preferred-size-changed event.
Raises the label-removed event.
Raises the label-style-changed event.
Raises the label-tag-changed event.
Raises the label-text-changed event.
Raises the node-created event.
Raises the node-layout-changed event.
Raises the node-removed event.
Parameters
- evt: NodeEventArgs
- The parameters for the event.
Overridden in
FilteredGraphWrapper.onNodeRemovedRaises the node-style-changed event.
Raises the node-tag-changed event.
Dispatches the parent-changed event.
Raises the port-added event.
onPortLocationParameterChanged
(evt: ItemChangedEventArgs<IPort, IPortLocationModelParameter>)protectedRaises the port-location-parameter-changed event
onPortLocationParameterChanged
(evt: ItemChangedEventArgs<IPort, IPortLocationModelParameter>)Parameters
- evt: ItemChangedEventArgs<IPort, IPortLocationModelParameter>
- The parameters for the event
Raises the port-removed event.
Raises the port-style-changed event.
Raises the port-tag-changed event.
Calculates the number of outgoing edges at the given IPortOwner for this graph.
Parameters
- owner: IPortOwner
- The port owner to count the outgoing edges of.
Return Value
- number
- The number of edges that have the port owner as their source port's owner.
Throws
- Exception ({ name: 'ArgumentError' })
owneris not in this graph.
See Also
Developer's Guide
API
- edgesAt
Defined in
IGraph.outDegreeParameters
- port: IPort
- The port to count the outgoing edges of.
Return Value
- number
- The number of edges that have the port as their source port.
Throws
- Exception ({ name: 'ArgumentError' })
portis not in this graph.
See Also
Developer's Guide
API
- edgesAt
Defined in
IGraph.outDegreeReturns the outgoing edges at the given owner.
This method delegates to edgesAt using OUTGOING.
Note that even though edges can be accessed via index, the underlying graph structure in the default IGraph implementation is a linked list and indexed access can be slow. In those cases it is recommended to store the edges in your own list, if possible. This is not necessary for the first or last element or when iterating over the outgoing edges via a foreach loop.
Parameters
- owner: IPortOwner
- The owner of the edges.
Return Value
- IListEnumerable<IEdge>
- An enumerable for the edges.
Throws
- Exception ({ name: 'ArgumentError' })
owneris not in this graph.
See Also
Defined in
IGraph.outEdgesAtReturns the outgoing edges at the given port.
This method delegates to edgesAt using OUTGOING.
Note that even though edges can be accessed via index, the underlying graph structure in the default IGraph implementation is a linked list and indexed access can be slow. In those cases it is recommended to store the edges in your own list, if possible. This is not necessary for the first or last element or when iterating over the outgoing edges via a foreach loop.
Parameters
- port: IPort
- The owner of the edges.
Return Value
- IListEnumerable<IEdge>
- An enumerable for the edges.
Throws
- Exception ({ name: 'ArgumentError' })
portis not in this graph.
See Also
Defined in
IGraph.outEdgesAtEnumerates the predecessors of a given INode.
Parameters
- node: INode
- The node.
Return Value
- IEnumerable<INode>
- An enumerable over all predecessors.
Throws
- Exception ({ name: 'ArgumentError' })
nodeis not in this graph.
See Also
Developer's Guide
Defined in
IGraph.predecessorsRemoves the given item from this graph.
The item must be a part of this graph.
If the item is a node, the node-removed event will be triggered. This will remove all adjacent edges and their corresponding ports in proper order before the node will be removed. Also, this will trigger the removal of all labels owned by this instance.
If the item is an edge, the edge-removed event will be triggered. Also, this will trigger the removal of all labels and bends owned by this instance. An implementation may decide to remove the corresponding ports from the node if no other edge connects to them after the given edge has been removed. The implementations provided by yFiles do so according to the value set to autoCleanUp in their IPortDefaults.
If the item is a bend, the bend-removed event will be triggered.
If the item is a port, the port-removed event will be triggered. This will also remove all edges that are currently connected to the port and all labels and bends owned by this instance.
If the item is a label, the label-removed event will be triggered.
Parameters
- item: IModelItem
- the item to be removed from this graph instance
Implements
IGraph.removeRemoves event handlers for graph that have been added with addEventHandlers.
graph that have been added with addEventHandlers.Parameters
- graph: IGraph
- The graph for which event propagators should be removed
Overridden in
FilteredGraphWrapper.removeEventHandlersParameters
- edge: IEdge
- The edge to reverse.
Throws
- Exception ({ name: 'ArgumentError' })
edgeis not in this graph.
See Also
Developer's Guide
API
- setEdgePorts
Defined in
IGraph.reverseThis will trigger an edge-ports-changed event if source or target ports differ from the current ones. Both ports and the edge must belong to the current graph instance.
An implementation may decide to remove the corresponding ports if no other edge connects to them after the given edge has its source or target port changed. The implementations provided by yFiles do so according to the value set to autoCleanUp in their IPortDefaults.
To query the current source and target ports, you can use the sourcePort and targetPort properties.
Parameters
- edge: IEdge
- The edge to change the ports.
- sourcePort: IPort
- The new source port instance.
- targetPort: IPort
- The new target port instance.
Implements
IGraph.setEdgePortsChanges whether the given node is a group node or not.
Group nodes are nodes which can have children. They may not necessarily have to, however.
Attempting to set a node to the non-group-node-status while it has children at the same time will result in an InvalidOperationError.
Parameters
- node: INode
- The node to set the group node status for.
- isGroupNode: boolean
- Whether to make the node a group node.
Implements
IGraph.setIsGroupNodeOverridden in
FilteredGraphWrapper.setIsGroupNodeSets the label model parameter for the given label.
Parameters
- label: ILabel
- The label.
- layoutParameter: ILabelModelParameter
- The new parameter.
Implements
IGraph.setLabelLayoutParameterParameters
Implements
IGraph.setLabelPreferredSizeSets the label text of the given label.
Parameters
- label: ILabel
- the label to modify
- text: string
- the new text of the label
Implements
IGraph.setLabelTextParameters
- node: INode
- The node to recenter.
- center: Point
- The new center coordinates of the node in the world coordinate system.
Throws
- Exception ({ name: 'ArgumentError' })
centercontains one or more NaN values.
See Also
Developer's Guide
API
- setNodeLayout
Defined in
IGraph.setNodeCenterParameters
- node: INode
- a live node that belongs to this graph
- layout: Rect
- The new layout of the node to assign to its layout.
Implements
IGraph.setNodeLayoutUse null as parent to make node a top-level node for this graph.
This method does not move or enlarge the parent to enclose its new node. Developers have to take care to adjust the node layout after grouping, e.g. by calling adjustGroupNodeLayout.
If parent is not a group node before the call it will be converted into one.
To query the parent of a node, use getParent.
Parameters
- node: INode
- The node to assign a new parent.
- parent: INode
- The parent group node to assign to
nodeornullto makenodea top-level node.
Implements
IGraph.setParentOverridden in
FilteredGraphWrapper.setParentParameters
Throws
- Exception ({ name: 'ArgumentError' })
portis not in this graph.- Exception ({ name: 'ArgumentError' })
locationcontains one or more NaN values.
See Also
Defined in
IGraph.setPortLocationSets a new IPortLocationModelParameter for the given port.
Parameters
- port: IPort
- The port to modify
- locationParameter: IPortLocationModelParameter
- The new parameter that determines the coordinates of the port
Implements
IGraph.setPortLocationParameterParameters
- port: IPort
- the port
- relativeLocation: Point
- the new coordinate offsets relative to the center of the node's layout's center.
Throws
- Exception ({ name: 'ArgumentError' })
portis not in this graph or has no owner.- Exception ({ name: 'ArgumentError' })
relativeLocationcontains one or more NaN values.
See Also
Defined in
IGraph.setRelativePortLocationAssigns the given style instance by reference to the node.
Style instances can be shared.
To query the node style, use style.
Styles are automatically converted between WebGL and SVG rendering modes. Due to differences in feature sets, conversion may not be exact. For better control, apply styles specific to the rendering mode or use a WebGLNodeStyleDecorator style when switching render modes.
Parameters
- node: INode
- The node that will be assigned the new style
- style: INodeStyle
- The style instance that will be assigned to the node.
Implements
IGraph.setStyleAssigns the given style instance by reference to the label.
Style instances can be shared.
To query the label style, use style.
Styles are automatically converted between WebGL and SVG rendering modes. Due to differences in feature sets, conversion may not be exact. For better control, apply styles specific to the rendering mode or use a WebGLLabelStyleDecorator style when switching render modes.
Parameters
- label: ILabel
- The label that will be assigned the new style
- style: ILabelStyle
- The style instance that will be assigned to the label.
Implements
IGraph.setStyleAssigns the given style instance by reference to the edge.
Style instances can be shared.
To query the edge style, use style.
Styles are automatically converted between WebGL and SVG rendering modes. Due to differences in feature sets, conversion may not be exact. For better control, apply styles specific to the rendering mode or use a WebGLEdgeStyleDecorator style when switching render modes.
Parameters
- edge: IEdge
- The edge that will be assigned the new style
- style: IEdgeStyle
- The style instance that will be assigned to the edge.
Implements
IGraph.setStyleAssigns the given style instance by reference to the port.
Style instances can be shared.
To query the port style, use style.
Parameters
- port: IPort
- The port that will be assigned the new style
- style: IPortStyle
- The style instance that will be assigned to the port.
Implements
IGraph.setStyleEnumerates the successors of a given INode.
Parameters
- node: INode
- The node.
Return Value
- IEnumerable<INode>
- An enumerable over all successors.
Throws
- Exception ({ name: 'ArgumentError' })
nodeis not in this graph.
See Also
Developer's Guide
Defined in
IGraph.successorsEvents
Occurs when a bend has been added to an edge in this graph.
Properties of
ItemEventArgs<IBend>- item: T
- Gets the item that is the subject of the event.
Implements
IGraph.bend-addedImplements
IGraph.bend-location-changedOccurs when a bend has been removed from an edge in this graph.
This event will be triggered, too, if an edge has been removed from the graph, for each of the bends that belonged to the edge.
This event is intended to provide notification of low level changes in the graph structure. Please use the deleted-item event if you are interested only in bend removal events that result from user interaction.
Properties of
BendEventArgs- index: number
- Gets the former index of the bend in the bends list.
- item: IBend
- Gets the item that is the subject of the event.
- owner: IEdge
- Gets the owner of the bend that owned the bend before the event happened.
Implements
IGraph.bend-removedOccurs when the tag of a bend has been replaced.
Properties of
ItemChangedEventArgs<IBend, any>- item: TItem
- Gets the item that is the subject of the event.
- oldValue: TValue
- Gets the value of the property before the change.
Implements
IGraph.bend-tag-changedOccurs when the graph has changed visually and the display should be updated to reflect the changes.
Properties of
EventArgsImplements
IGraph.displays-invalidatedOccurs when an edge has been created.
Properties of
ItemEventArgs<IEdge>- item: T
- Gets the item that is the subject of the event.
Implements
IGraph.edge-createdProperties of
EdgeEventArgs- item: IEdge
- Gets the item that is the subject of the event.
- sourcePort: IPort
- Gets the source port the edge was connected to before the event happened.
- sourcePortOwner: IPortOwner
- Gets the owner of the source port the edge was connected to before the event happened.
- targetPort: IPort
- Gets the target port the edge was connected to before the event happened.
- targetPortOwner: IPortOwner
- Gets the owner of the target port the edge was connected to before the event happened.
Implements
IGraph.edge-ports-changedOccurs when an edge has been removed.
This event will be triggered, too, prior to a node removal.
This event is intended to provide notification of low level changes in the graph structure. Please use the deleted-item event if you are interested only in edge removal events that result from user interaction.
Properties of
EdgeEventArgs- item: IEdge
- Gets the item that is the subject of the event.
- sourcePort: IPort
- Gets the source port the edge was connected to before the event happened.
- sourcePortOwner: IPortOwner
- Gets the owner of the source port the edge was connected to before the event happened.
- targetPort: IPort
- Gets the target port the edge was connected to before the event happened.
- targetPortOwner: IPortOwner
- Gets the owner of the target port the edge was connected to before the event happened.
Implements
IGraph.edge-removedOccurs when an edge style has been replaced.
Properties of
ItemChangedEventArgs<IEdge, IEdgeStyle>- item: TItem
- Gets the item that is the subject of the event.
- oldValue: TValue
- Gets the value of the property before the change.
Implements
IGraph.edge-style-changedOccurs when the tag of an edge has been replaced.
Properties of
ItemChangedEventArgs<IEdge, any>- item: TItem
- Gets the item that is the subject of the event.
- oldValue: TValue
- Gets the value of the property before the change.
Implements
IGraph.edge-tag-changedOccurs when the tag of the graph has been replaced.
Properties of
ItemChangedEventArgs<IGraph, any>- item: TItem
- Gets the item that is the subject of the event.
- oldValue: TValue
- Gets the value of the property before the change.
Implements
IGraph.graph-tag-changedOccurs if the group node status of a node has changed.
Properties of
NodeEventArgs- isGroupNode: boolean
- Gets whether the node was a group node before this event.
- item: INode
- Gets the item that is the subject of the event.
Implements
IGraph.is-group-node-changedOccurs when a label has been added to this graph instance.
Properties of
ItemEventArgs<ILabel>- item: T
- Gets the item that is the subject of the event.
Implements
IGraph.label-addedOccurs when the model parameter of a label has been changed.
Properties of
ItemChangedEventArgs<ILabel, ILabelModelParameter>- item: TItem
- Gets the item that is the subject of the event.
- oldValue: TValue
- Gets the value of the property before the change.
Implements
IGraph.label-layout-parameter-changedOccurs when the preferred size of a label has been changed.
Properties of
ItemChangedEventArgs<ILabel, Size>- item: TItem
- Gets the item that is the subject of the event.
- oldValue: TValue
- Gets the value of the property before the change.
Implements
IGraph.label-preferred-size-changedOccurs when a label has been removed from this graph instance.
This event will also be triggered, prior to the removal of the owner of the label.
This event is intended to provide notification of low level changes in the graph structure. Please use the deleted-item event if you are interested only in label removal events that result from user interaction.
Properties of
LabelEventArgs- item: ILabel
- Gets the item that is the subject of the event.
- owner: ILabelOwner
- Gets the owner of the label that owned the label before the event happened.
Implements
IGraph.label-removedOccurs when a label style has been replaced.
Properties of
ItemChangedEventArgs<ILabel, ILabelStyle>- item: TItem
- Gets the item that is the subject of the event.
- oldValue: TValue
- Gets the value of the property before the change.
Implements
IGraph.label-style-changedOccurs when the tag of a label has been replaced.
Properties of
ItemChangedEventArgs<ILabel, any>- item: TItem
- Gets the item that is the subject of the event.
- oldValue: TValue
- Gets the value of the property before the change.
Implements
IGraph.label-tag-changedOccurs when the text of a label has been changed.
Properties of
ItemChangedEventArgs<ILabel, string>- item: TItem
- Gets the item that is the subject of the event.
- oldValue: TValue
- Gets the value of the property before the change.
Implements
IGraph.label-text-changedOccurs when a node has been created.
Properties of
ItemEventArgs<INode>- item: T
- Gets the item that is the subject of the event.
Implements
IGraph.node-createdImplements
IGraph.node-layout-changedOccurs when a node has been removed.
Properties of
NodeEventArgs- isGroupNode: boolean
- Gets whether the node was a group node before this event.
- item: INode
- Gets the item that is the subject of the event.
Implements
IGraph.node-removedOccurs when a node style has been replaced.
Properties of
ItemChangedEventArgs<INode, INodeStyle>- item: TItem
- Gets the item that is the subject of the event.
- oldValue: TValue
- Gets the value of the property before the change.
Implements
IGraph.node-style-changedOccurs when the tag of a node has been replaced.
Properties of
ItemChangedEventArgs<INode, any>- item: TItem
- Gets the item that is the subject of the event.
- oldValue: TValue
- Gets the value of the property before the change.
Implements
IGraph.node-tag-changedOccurs if a node has been reparented in the model.
Properties of
NodeEventArgs- isGroupNode: boolean
- Gets whether the node was a group node before this event.
- item: INode
- Gets the item that is the subject of the event.
Implements
IGraph.parent-changedOccurs when a port has been added to this graph instance.
Properties of
ItemEventArgs<IPort>- item: T
- Gets the item that is the subject of the event.
Implements
IGraph.port-addedOccurs when the location model parameter of a port has been changed.
Properties of
ItemChangedEventArgs<IPort, IPortLocationModelParameter>- item: TItem
- Gets the item that is the subject of the event.
- oldValue: TValue
- Gets the value of the property before the change.
Implements
IGraph.port-location-parameter-changedOccurs when a port has been removed from its owner.
This event will also be triggered prior to the removal of the corresponding owner of the port.
This event is intended to provide notification of low level changes in the graph structure. Please use the deleted-item event if you are interested only in port removal events that result from user interaction.
Properties of
PortEventArgs- item: IPort
- Gets the item that is the subject of the event.
- owner: IPortOwner
- Gets the owner of the port that was connected to before the event happened.
Implements
IGraph.port-removedOccurs when a port style has been replaced.
Properties of
ItemChangedEventArgs<IPort, IPortStyle>- item: TItem
- Gets the item that is the subject of the event.
- oldValue: TValue
- Gets the value of the property before the change.
Implements
IGraph.port-style-changedOccurs when the tag of a port has been replaced.
Properties of
ItemChangedEventArgs<IPort, any>- item: TItem
- Gets the item that is the subject of the event.
- oldValue: TValue
- Gets the value of the property before the change.