DiagramMediator
open class DiagramMediator
Class that updates diagram items.
-
The DiagramItem-s that were modified.
Declaration
Swift
open var items:[DiagramItem]
-
The AdjustmentHandle that is dragged by the user.
Declaration
Swift
open var handle:AdjustmentHandle?
-
Initializes a new instance of the DiagramMediator class.
Returns
The newly created DiagramMediator object.Declaration
Swift
public init(handle:AdjustmentHandle?)
Return Value
The newly created DiagramMediator object.
-
Notifies the DiagramMediator that node bounds have changed.
Parameter
Parameter node: The DiagramNode that was modified.Parameter
Parameter oldBounds: The bounding rectangle of the node before it was modified.Declaration
Swift
open func onNodeModified (_ node: DiagramNode, oldBounds: Rect)
Parameters
node
The DiagramNode that was modified.
oldBounds
The bounding rectangle of the node before it was modified.
-
Notifies the DiagramMediator that link points have changed.
Parameter
Parameter link: The DiagramNode that was modified.Parameter
Parameter oldOrigin: The origin point of the link before it was modified.Parameter
Parameter oldDestination: The destination point of the link before it was modified.Declaration
Swift
open func onLinkModified (_ link: DiagramLink, oldOrigin: Point, oldDestination: Point)
Parameters
link
The DiagramNode that was modified.
oldOrigin
The origin point of the link before it was modified.
oldDestination
The destination point of the link before it was modified.
-
Clears all items.
Declaration
Swift
open func clear()
-
Updates all dependencies between links and nodes.
Declaration
Swift
open func updateDependencies()
-
Registers the specified item as being modified.
Parameter
Parameter item: The DiagramItem that was modified.Declaration
Swift
open func registerProcessedItem(_ item:DiagramItem)
Parameters
item
The DiagramItem that was modified.