Defines the behavior of a port, that sticks to a point
Object
Allows the user to save custom information/data about a port
Defaults to undefined
Defines the allowed direction for connections to the port
Defaults to ‘Auto’
Defines the constraints of port
Defaults to ‘Default’
number
Sets the height of the port
Defaults to 12
Sets the horizontal alignment of the port with respect to its immediate parent(node/connector)
Defaults to ‘Center’
string
Defines the unique id of the port
Defaults to ”
string[]
Defines the collection of the objects that are connected to a particular port
Defaults to undefined
Defines the space that the port has to be moved from its actual position
Defaults to new Margin(0,0,0,0)
Defines the position of the port with respect to the boundaries of nodes/connector
Defaults to new Point(0.5,0.5)
string[]
Defines the collection of the objects that are connected to a particular port
Defaults to undefined
string
Defines the geometry of the port
Defaults to ”
Defines the type of the port shape
Defaults to ‘Square’
Defines the appearance of the port
<div id='diagram'></div>
let port: PointPortModel[] =
[{ id: 'port1', visibility: PortVisibility.Visible, shape: 'Circle', offset: { x: 0, y: 0 } },];
let nodes: NodeModel[] = [{
id: 'node1', width: 100, height: 100, offsetX: 100, offsetY: 100,
}];
nodes.ports = port;
let diagram: Diagram = new Diagram({
...
nodes : nodes,
...
});
diagram.appendTo('#diagram');
Defaults to {}
defines the tooltip for the Ports
Defaults to new DiagramToolTip();
Sets the vertical alignment of the port with respect to its immediate parent(node/connector)
Defaults to ‘Center’
Defines the type of the port visibility
Defaults to ‘Connect’
number
Sets the width of the port
Defaults to 12