Home > @jsplumbtoolkit/browser-ui > ViewPortOptions
ViewPortOptions interface
Definition of a port inside a view.
Signature:
export interface ViewPortOptions extends ViewNodeOrPortOptions
Extends: ViewNodeOrPortOptions
Properties
Property | Modifiers | Type | Description |
---|---|---|---|
anchor? | AnchorSpec | (Optional) Spec for anchors connected to this port | |
anchorOffsetX? | number | (Optional) Offset, in pixels, to apply to the position in the x axis after the anchorX value has been used to compute its default position. | |
anchorOffsetY? | number | (Optional) Offset, in pixels, to apply to the position in the y axis after the anchorY value has been used to compute its default position. | |
anchorOrientationX? | number | (Optional) The orientation in the x axis for connections attached to an anchor created for this port. | |
anchorOrientationY? | number | (Optional) The orientation in the y axis for connections attached to an anchor created for this port. | |
anchorX? | number | (Optional) The x location of any anchors created for this port. Allows you to specify where, in proportional values, the anchor should be located in the x axis. For a full discussion of how to use this (and the other anchor properties in this interface), see the documentation for anchors. | |
anchorY? | number | (Optional) The y location of any anchors created for this port. Allows you to specify where, in proportional values, the anchor should be located in the y axis. | |
edgeType? | string | (Optional) Type of edges generated by this port. | |
endpoint? | EndpointSpec | (Optional) If isEndpoint is set to true, you can provide a spec for the endpoint with this parameter. | |
hoverPaintStyle? | PaintStyle | (Optional) If isEndpoint is set to true, you can provide a spec for the endpoint's hover paint style with this parameter. | |
isEndpoint? | boolean | (Optional) If true, the port is rendered as an endpoint. By default this is false (meaning the port is represented by some DOM element that you have rendered). | |
isSource? | boolean | (Optional) Whether or not the port can act as a source for dragged connections. Defaults to false. | |
isTarget? | boolean | (Optional) Whether or not the port can act as a target for dragged connections. Defaults to false. | |
paintStyle? | PaintStyle | (Optional) If isEndpoint is set to true, you can provide a spec for the endpoint's paint style with this parameter. | |
uniqueEndpoint? | boolean | (Optional) Normally, each time a new connection is established a port on which isEndpoint is set to true, a new endpoint is created for that connection. Setting this flag will cause the Toolkit to only ever create a single endpoint for the port, to which all connections should be attached. Note that you may wish to consider the maxConnections parameter if you use this, as by default the endpoint will be created with a limit of 1 connection. |