Attachment
open class Attachment
Encapsulates attachment information.
-
Initializes a new instance of the Attachment class with the specified child node, master item and node offset.
Declaration
Swift
public init(master: DiagramItem, childNode: DiagramNode, nodeOffset: AttachToNode)
Parameters
master
The DiagramItem, which is the master for this Attachment.
childNode
The DiagramNode, which is the child node for this Attachment.
nodeOffset
The offset between nodes in this Attachment.
-
Initializes a new instance of the Attachment class with the specified child node, master item and link offset.
Declaration
Swift
public init(master: DiagramItem, childNode: DiagramNode, linkOffset: AttachToLink)
Parameters
master
The DiagramItem, which is the master for this Attachment.
childNode
The DiagramNode, which is the child node for this Attachment.
linkOffset
The offset between links in this Attachment.
-
Detaches the items.
Declaration
Swift
open func detach()
-
Updates the position of the child item according to the current position of the master. Overridden by derived classes.
Declaration
Swift
open func updateFromMaster()
-
Horizontal offset from the attached node to the master item.
Declaration
Swift
open var offsetX: Double
-
Vertical offset from the attached node to the master item.
Declaration
Swift
open var offsetY: Double
-
The DiagramItem, which is master of this Attachment.
Declaration
Swift
open var master: DiagramItem
-
The DiagramNode, which is the child of this Attachment.
Declaration
Swift
open var childNode: DiagramNode
-
The offset of the child node. One of the AttachToNode enumeration values.
Declaration
Swift
open var nodeOffset: AttachToNode?
-
The offset of the link. One of the AttachToLink enumeration values.
Declaration
Swift
open var linkOffset: AttachToLink?
-
The width of the Attachment.
Declaration
Swift
open var width: Double
-
The height of the Attachment.
Declaration
Swift
open var height: Double