Defines the behavior of connection ports
Object
Allows the user to save custom information/data about a port
Defaults to undefined
Defines the constraints of port
Defaults to ‘Default’
number
Sets the height of the port
Defaults to 12
string
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)
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 ”
string
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 {}
string
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