Link class
A Link is a Part that connects Nodes. The link relationship is directional, going from Link#fromNode to Link#toNode. A link can connect to a specific port element in a node, as named by the Link#fromPortId and Link#toPortId properties.
For more discussion, see Introduction to Links.
To add a Link to a Diagram when using a GraphLinksModel you should do something like:
myDiagram.startTransaction("make new link");
myDiagram.model.addLinkData({ from: "Alpha", to: "Beta" });
myDiagram.commitTransaction("make new link");
where you would substitute the keys of the actual nodes that you want to connect with a link. This will cause a Link to be created (copying the template found in Diagram#linkTemplateMap), added to the Diagram in some Layer (based on Part#layerName), and bound to the link data (resulting in Panel#data referring to that link data object). Note that link data objects, unlike Node data, do not have their own unique keys or identifiers, because other Parts do not refer to them.
If you are using a TreeModel, there are no link data objects, so you just need to call TreeModel#setParentKeyForNodeData to specify the "parent" node's key for a "child" node data.
To find a Link given a link data object in the GraphLinksModel, call Diagram#findLinkForData. When using a TreeModel, call either Diagram#findNodeForData or Diagram#findNodeForKey to get a Node, and then call Node#findTreeParentLink to get the Link, if any exists.
To find a link that connects two nodes, call Node#findLinksTo or Node#findLinksBetween. With the former method, the direction matters; with the latter method it returns links in either direction.
A link's position and size are determined by the two nodes that it connects. Normally there should be a Shape as the main element in this Link. This shape is what users will see as the "line" or "wire" -- you can set its Shape#stroke and other "stroke..." properties to control its appearance.
The link will compute a route (a sequence of points) going from the #fromNode's port element to the #toNode's port element. That route is used to generate the path of the main shape. Properties that affect the nature of the route and the geometry of the path include:
- #curve
- #curviness
- #corner
- #routing
- #smoothness
- #adjusting
For more discussion and examples, see Links.
There are additional properties that affect how the end of the link connects to a port element of a node. There are duplicate properties, ones for the "to" end and ones for the "from" end:
- #fromSpot, #toSpot
- #fromEndSegmentLength, #toEndSegmentLength
- #fromShortLength, #toShortLength
These properties normally have "default" values, causing the link's routing and path-geometry generating to get the corresponding values from the connected port element. This scheme permits an individual link to have its own specific connection to a port, taking precedence over how the port normally expects links to connect to it. For example, several of the Layout classes sets these properties on each Link as part of their route computation for links.
For more discussion and examples, see Link Points.
Elements other than the main Shape in the Link may act as decorations on the link, including arrowheads and labels. You can control where they are located along the link route and how they are oriented. Because these decorations may be any GraphObject, they are all properties of that class. The properties include:
- GraphObject#segmentIndex
- GraphObject#segmentFraction
- GraphObject#segmentOffset
- GraphObject#segmentOrientation
If you do not set the GraphObject#segmentIndex property, the object is positioned to be at the middle of the link.
For more discussion and examples, see Link Labels.
GoJS makes it easy to add arrowheads to your link template. Just add a Shape with the appearance properties that you want, and also set the Shape#toArrow or Shape#fromArrow property to the name of the kind of arrowhead that you want. Doing so automatically sets the "segment..." properties that are appropriate for the chosen arrowhead.
More than one shape may automatically get the route geometry. This is useful when you want to have multiple link shapes with different thicknesses to create a gradient effect across the path of the link or to produce parallel lines along the path. Just set GraphObject#isPanelMain to true on each such Shape.
If you want the user to be able to reconnect a link, using the RelinkingTool, you need to set one or both of #relinkableFrom and #relinkableTo to true. The RelinkingTool shows a RelinkingTool#fromHandleArchetype and/or a RelinkingTool#toHandleArchetype when the link is selected. Such a relink handle can be dragged by the user to start a relinking operation.
If you want the user to be able to change the path of the link, using the LinkReshapingTool, set Part#reshapable to true. The LinkReshapingTool shows reshape handles that the user can drag to shift the position of a point in the link's route. The LinkReshapingTool#handleArchetype is copied for each reshape handle.
Often if a Link is reshapable, you will want to save the route in the model so that it can be restored
upon load. To save the route automatically, add a TwoWay Binding on the #points property:
new go.Binding("points").makeTwoWay()
. Model#toJson will automatically
convert the List of Points into an Array of numbers in the JSON representation,
if the property is named "points".
If a Link is Part#reshapable, it is also possible to allow the user to add and remove segments from the link's route by setting #resegmentable to true. This causes the LinkReshapingTool to add resegmenting handles at the midpoints of each segment. The LinkReshapingTool#midHandleArchetype is copied for each resegment handle. When the user drags such a resegmenting handle, a new segment is inserted into the route. Also, when the user drags a reshape handle such that two adjacent segments end up in a straight line, a segment is removed from the route.
For more discussion and examples, see Links, Link Labels, and Link Points.
To control what links a user may draw or reconnect, please read about Validation.
To customize linking and relinking behavior, please read Introduction to the Linking Tools and Introduction to the RelinkingTool. For customizing the reshaping of Links, see Introduction to the LinkReshapingTool.
Only Links that are in Diagrams can have connections with Nodes. Templates should not be connected with Nodes, be members of Groups, or have any Adornments.
- Implemented types
- Available extensions
- Annotations
-
- @JS()
- @staticInterop
Constructors
- Link([dynamic init])
-
factory
Properties
- actionCancel ↔ void Function(InputEvent, GraphObject)?
-
Available on GraphObject, provided by the GraphObject$Typings extension
Gets or sets the function to execute when the ActionTool is cancelled and this GraphObject's #isActionable is set to true. This property is infrequently set. By default this property is null.getter/setter pair - actionDown ↔ void Function(InputEvent, GraphObject)?
-
Available on GraphObject, provided by the GraphObject$Typings extension
Gets or sets the function to execute on a mouse-down event when this GraphObject's #isActionable is set to true. This property is infrequently set. By default this property is null.getter/setter pair - actionMove ↔ void Function(InputEvent, GraphObject)?
-
Available on GraphObject, provided by the GraphObject$Typings extension
Gets or sets the function to execute on a mouse-move event when this GraphObject's #isActionable is set to true. This property is infrequently set. By default this property is null.getter/setter pair - actionUp ↔ void Function(InputEvent, GraphObject)?
-
Available on GraphObject, provided by the GraphObject$Typings extension
Gets or sets the function to execute on a mouse-up event when this GraphObject's #isActionable is set to true. This property is infrequently set. By default this property is null.getter/setter pair - actualBounds ↔ Rect
-
Available on GraphObject, provided by the GraphObject$Typings extension
This read-only property returns the bounds of this GraphObject in container coordinates. This means that the actualBounds are in the coordinate space of the GraphObject's Panel, unless this is a Part, in which case they are in the Diagram's coordinate system.getter/setter pair - adjusting ↔ EnumValue
-
Available on Link, provided by the Link$Typings extension
Gets or sets how the route is computed, including whether it uses the points of its old route to determine the new route. The value must be one of Link.None|None, Link.End|End, Link.Scale|Scale, or Link.Stretch|Stretch.getter/setter pair -
adornments
↔ Iterator<
Adornment> -
Available on Part, provided by the Part$Typings extension
This read-only property returns an iterator over all of the Adornments associated with this part. After each call to the iterator's next() method that returns true, the iterator's key will be the category and the iterator's value will be an Adornment.getter/setter pair - alignment ↔ Spot
-
Available on GraphObject, provided by the GraphObject$Typings extension
Gets or sets the alignment Spot of this GraphObject used in Panel layouts, to determine where in the area allocated by the panel this object should be placed.getter/setter pair - alignmentFocus ↔ Spot
-
Available on GraphObject, provided by the GraphObject$Typings extension
Gets or sets the spot on this GraphObject to be used as the alignment point in Spot and Fixed Panels. Value must be of the Spot.getter/setter pair - alignmentFocusName ↔ String
-
Available on Panel, provided by the Panel$Typings extension
For Panels which are elements of Spot Panels: Gets or sets the name of this Panel's element that should be used as the alignment object instead of this Panel.getter/setter pair - angle ↔ num
-
Available on GraphObject, provided by the GraphObject$Typings extension
Gets or sets the angle transform, in degrees, of this GraphObject. Value must be a number. If the value is not between (0 <= value < 360), it will be normalized to be in that range. Zero is along the positive X-axis (rightwards); 90 is along the positive Y-axis (downwards). Default is 0.getter/setter pair - areaBackground ↔ dynamic
-
Available on GraphObject, provided by the GraphObject$Typings extension
Gets or sets the areaBackground Brush of this GraphObject. The areaBackground fills the rectangle described by this GraphObject's containing panel's coordinates. If the object is rotated, the area background will expand to fill the entire measured bounds of the object, without rotating the brush.getter/setter pair - background ↔ dynamic
-
Available on GraphObject, provided by the GraphObject$Typings extension
Gets or sets the background Brush of this GraphObject, filling the rectangle of this object's local coordinate space. If the object is rotated, the background will rotate with it.getter/setter pair - bind → ({GraphObject Function(Binding binding) $1, GraphObject Function([String? targetprop, String? sourceprop, TargetConversion? conv, BackConversion? backconv]) $2})
-
Available on GraphObject, provided by the GraphObject$Typings extension
Overload accessor: $1, $2no setter - category ↔ String
-
Available on Part, provided by the Part$Typings extension
Gets or sets the category of this part, typically used to distinguish different kinds of nodes or links.getter/setter pair - click ↔ void Function(InputEvent, GraphObject)?
-
Available on GraphObject, provided by the GraphObject$Typings extension
Gets or sets the function to execute when the user single-primary-clicks on this object. This typically involves a mouse-down followed by a prompt mouse-up at approximately the same position using the left (primary) mouse button. This property is used by the ClickSelectingTool when the user clicks on a GraphObject. The function is called in addition to the DiagramEvent that is raised with the name"ObjectSingleClicked"
.getter/setter pair - column ↔ num
-
Available on GraphObject, provided by the GraphObject$Typings extension
Gets or sets the column of this GraphObject if it is in a Table Panel. The value must be a small non-negative integer. The default is 0.getter/setter pair - columnCount ↔ num
-
Available on Panel, provided by the Panel$Typings extension
For Panel.Table|Table Panels: This read-only property returns the number of columns. This value is only valid after the Panel has been measured.getter/setter pair - columnSizing ↔ EnumValue
-
Available on Panel, provided by the Panel$Typings extension
For Panel.Table|Table Panels: Gets or sets how this Panel's columns deal with extra space. Valid values are RowColumnDefinition.ProportionalExtra and RowColumnDefinition.None. The default is RowColumnDefinition.ProportionalExtra.getter/setter pair - columnSpan ↔ num
-
Available on GraphObject, provided by the GraphObject$Typings extension
Gets or sets the number of columns spanned by this GraphObject if it is in a Table Panel. The value must be a small positive integer. The default is 1.getter/setter pair - containingGroup ↔ Group?
-
Available on Part, provided by the Part$Typings extension
Gets or sets the Group of which this Part or Node is a member. This will be null if this is a top-level part.getter/setter pair - containingGroupChanged ↔ void Function(Part, [Group?, Group?])?
-
Available on Part, provided by the Part$Typings extension
Gets or sets the function that is called after this Part has changed which Group it belongs to, if any. It is typically used to modify the appearance of the part. The first argument will be this Part. The second argument will be the old Group, or null if it had been a top-level part. The third argument will be the new Group, or null if it is now a top-level part.getter/setter pair - contextClick ↔ void Function(InputEvent, GraphObject)?
-
Available on GraphObject, provided by the GraphObject$Typings extension
Gets or sets the function to execute when the user single-secondary-clicks on this object. This typically involves a mouse-down followed by a prompt mouse-up at approximately the same position using the right (secondary) mouse button. This property is used by the ClickSelectingTool when the user clicks on a GraphObject. The function is called in addition to the DiagramEvent that is raised with the name"ObjectContextClicked"
.getter/setter pair - contextMenu ↔ dynamic
-
Available on GraphObject, provided by the GraphObject$Typings extension
This Adornment or HTMLInfo is shown upon a context click on this object. The default value is null, which means no context menu is shown.getter/setter pair - copyable ↔ bool
-
Available on Part, provided by the Part$Typings extension
Gets or sets whether the user may copy this part. The initial value is true.getter/setter pair - corner ↔ num
-
Available on Link, provided by the Link$Typings extension
Gets or sets how rounded the corners are for adjacent line segments when the #curve is Link.None|None, Link.JumpGap|JumpGap, or Link.JumpOver|JumpOver and the two line segments are orthogonal to each other.getter/setter pair - cursor ↔ String
-
Available on GraphObject, provided by the GraphObject$Typings extension
Gets or sets the mouse cursor to use when the mouse is over this object with no mouse buttons pressed. The value is null when no particular cursor is specified for this object; the actual cursor is determined by any containing Panel.getter/setter pair - curve ↔ EnumValue
-
Available on Link, provided by the Link$Typings extension
Gets or sets the way the path is generated from the route's points. The value must be one of Link.None|None, Link.Bezier|Bezier, Link.JumpGap|JumpGap, or Link.JumpOver|JumpOver.getter/setter pair - curviness ↔ num
-
Available on Link, provided by the Link$Typings extension
Gets or sets how far the control points are offset when the #curve is Link.Bezier|Bezier or when there are multiple links between the same two ports.getter/setter pair - data ↔ dynamic
-
Available on Panel, provided by the Panel$Typings extension
Gets or sets the optional model data to which this panel is data-bound. The data must be a JavaScript Object if this is a Part. The data can be any JavaScript value if this is a Panel created for an item in an Array that was data-bound by the #itemArray property. The default value is null.getter/setter pair - defaultAlignment ↔ Spot
-
Available on Panel, provided by the Panel$Typings extension
Gets or sets the default alignment spot of this Panel, used as the alignment for an element when its GraphObject#alignment value is Spot.Default. The default value is Spot.Default, which is interpreted by the Panel in whatever manner seems reasonable, depending on the Panel type.getter/setter pair -
defaultColumnSeparatorDashArray
↔ Array<
num> ? -
Available on Panel, provided by the Panel$Typings extension
For Panel.Table|Table Panels: Gets or sets the default dash array for a column's separator. RowColumnDefinition#separatorStrokeWidth can override this default value.getter/setter pair - defaultColumnSeparatorStroke ↔ dynamic
-
Available on Panel, provided by the Panel$Typings extension
For Panel.Table|Table Panels: Gets or sets the default stroke (color) for columns provided a given column has a nonzero RowColumnDefinition#separatorStrokeWidth. RowColumnDefinition#separatorDashArray can override this default value. The default value is null -- no line is drawn.getter/setter pair - defaultColumnSeparatorStrokeWidth ↔ num
-
Available on Panel, provided by the Panel$Typings extension
For Panel.Table|Table Panels: Gets or sets the default stroke width for a column's separator. RowColumnDefinition#separatorStrokeWidth can override this default value. The default value is 1. Any new value must be a real, non-negative number.getter/setter pair - defaultFromPoint ↔ Point
-
Available on Link, provided by the Link$Typings extension
(undocumented)getter/setter pair -
defaultRowSeparatorDashArray
↔ Array<
num> ? -
Available on Panel, provided by the Panel$Typings extension
For Panel.Table|Table Panels: Gets or sets the default dash array for a row's separator. RowColumnDefinition#separatorDashArray can override this default value.getter/setter pair - defaultRowSeparatorStroke ↔ dynamic
-
Available on Panel, provided by the Panel$Typings extension
For Panel.Table|Table Panels: Gets or sets the default stroke (color) for rows provided a given row has a nonzero RowColumnDefinition#separatorStrokeWidth. RowColumnDefinition#separatorStroke can override this default value. The default value is null -- no line is drawn.getter/setter pair - defaultRowSeparatorStrokeWidth ↔ num
-
Available on Panel, provided by the Panel$Typings extension
For Panel.Table|Table Panels: Gets or sets the default stroke width for a row's separator. RowColumnDefinition#separatorStrokeWidth can override this default value. The default value is 1. Any new value must be a real, non-negative number.getter/setter pair - defaultSeparatorPadding ↔ Object
-
Available on Panel, provided by the Panel$Typings extension
For Panel.Table|Table Panels: Gets or sets the additional padding for rows and columns. Padding is applied both before and after a row or column's contents.getter/setter pair - defaultStretch ↔ EnumValue
-
Available on Panel, provided by the Panel$Typings extension
Gets or sets the default stretch of this Panel, used as the stretch for an element when its GraphObject#stretch value is GraphObject.Default. The default value is GraphObject.Default, which typically resolves to GraphObject.None.getter/setter pair - defaultToPoint ↔ Point
-
Available on Link, provided by the Link$Typings extension
(undocumented)getter/setter pair - deletable ↔ bool
-
Available on Part, provided by the Part$Typings extension
Gets or sets whether the user may delete this part. The initial value is true.getter/setter pair - desiredSize ↔ Size
-
Available on GraphObject, provided by the GraphObject$Typings extension
Gets or sets the desired size of this GraphObject in local coordinates. Value must be of type Size. Default is Size(NaN, NaN). You cannot modify the width or height of the value of this property -- if you want to change the desiredSize you must set this property to a different Size.getter/setter pair - diagram ↔ Diagram?
-
Available on GraphObject, provided by the GraphObject$Typings extension
This read-only property returns the Diagram that this GraphObject is in, if it is.getter/setter pair - diagram ↔ Diagram?
-
Available on Part, provided by the Part$Typings extension
This read-only property returns the Diagram that this Part is in.getter/setter pair - doubleClick ↔ void Function(InputEvent, GraphObject)?
-
Available on GraphObject, provided by the GraphObject$Typings extension
Gets or sets the function to execute when the user double-primary-clicks on this object. This typically involves a mouse-down/up/down/up in rapid succession at approximately the same position using the left (primary) mouse button. This property is used by the ClickSelectingTool when the user clicks on a GraphObject. The function is called in addition to the DiagramEvent that is raised with the name"ObjectDoubleClicked"
.getter/setter pair - dragComputation ↔ Point Function(Part, Point, Point)?
-
Available on Part, provided by the Part$Typings extension
Gets or sets the function used to determine the location that this Part can be dragged to. The first argument is a reference to the Part being dragged, the second argument is a Point describing the proposed location, and the third argument is a snapped location, if one was determined during dragging. It should return a Point that is the proposed new location.getter/setter pair -
elements
↔ Iterator<
GraphObject> -
Available on Panel, provided by the Panel$Typings extension
This read-only property returns an iterator over the collection of the GraphObjects that this panel manages.getter/setter pair - enabledChanged ↔ void Function(GraphObject, bool)?
-
Available on GraphObject, provided by the GraphObject$Typings extension
Gets or sets the function to execute when some containing Panel changes the value of Panel#isEnabled. It is typically used to modify the appearance of the object. This function must not change the value of any panel Panel#isEnabled.getter/setter pair - filter ↔ String
-
Available on GraphObject, provided by the GraphObject$Typings extension
Undocumented. May not work in Safari.getter/setter pair - firstPickIndex ↔ num
-
Available on Link, provided by the Link$Typings extension
(undocumented)getter/setter pair - fromEndSegmentLength ↔ num
-
Available on Link, provided by the Link$Typings extension
Gets or sets the length of the first segment, when the computed "from spot" at the #fromPort is not Spot.None. The default value is NaN, meaning that the value actually comes from the GraphObject#fromEndSegmentLength property of the #fromPort. This value also limits how short the #fromShortLength may be drawn.getter/setter pair - fromEndSegmentLength ↔ num
-
Available on GraphObject, provided by the GraphObject$Typings extension
Gets or sets the length of the first segment of a link coming from this port. This value is used when the computed "from spot" is not Spot.None. The default value is 10. This value also limits how short the Link#fromShortLength may be drawn.getter/setter pair - fromLinkable ↔ bool?
-
Available on GraphObject, provided by the GraphObject$Typings extension
Gets or sets whether the user may draw Links from this port. This property is used by LinkingBaseTool#isValidFrom.getter/setter pair - fromLinkableDuplicates ↔ bool
-
Available on GraphObject, provided by the GraphObject$Typings extension
Gets or sets whether the user may draw duplicate Links from this port. This property is used by LinkingBaseTool#isValidLink. The default value is false.getter/setter pair - fromLinkableSelfNode ↔ bool
-
Available on GraphObject, provided by the GraphObject$Typings extension
Gets or sets whether the user may draw Links that connect from this port's Node. This property is used by LinkingBaseTool#isValidLink. The default value is false.getter/setter pair - fromMaxLinks ↔ num
-
Available on GraphObject, provided by the GraphObject$Typings extension
Gets or sets the maximum number of links that may come out of this port. This property is used by LinkingBaseTool#isValidFrom.getter/setter pair - fromNode ↔ Node?
-
Available on Link, provided by the Link$Typings extension
Gets or sets the Node that this link comes from. The #fromPortId specifies which port the link comes from. The default value is null -- this link is not coming from any node.getter/setter pair - fromPort ↔ GraphObject?
-
Available on Link, provided by the Link$Typings extension
This read-only property returns a GraphObject that is the "from" port that this link is connected from. The #fromNode provides the node that the link is coming from. The #fromPortId provides the identifier for which port this link is coming from; you can set that property in order to change the value of this property. This method may return null.getter/setter pair - fromPortChanged ↔ void Function(Link, [GraphObject?, GraphObject?])?
-
Available on Link, provided by the Link$Typings extension
Gets or sets the function that is called after this Link changes which Node or port it connects from. The first argument will be this Link. The second argument will be the old GraphObject port. The third argument will be the new GraphObject port.getter/setter pair - fromPortId ↔ String
-
Available on Link, provided by the Link$Typings extension
Gets or sets the identifier of the port that this link comes from. The default value is the empty string.getter/setter pair - fromShortLength ↔ num
-
Available on GraphObject, provided by the GraphObject$Typings extension
Gets or sets how far the end segment of a link coming from this port stops short of the actual port. Positive values are limited by the #fromEndSegmentLength or Link#fromEndSegmentLength. Negative values cause the link to extend into the port. The default value is zero.getter/setter pair - fromShortLength ↔ num
-
Available on Link, provided by the Link$Typings extension
Gets or sets how far the end segment stops short of the actual port. Positive values are limited by the #fromEndSegmentLength or GraphObject#fromEndSegmentLength. Negative values cause the link to extend into the port. The default value is NaN -- the value actually comes from the GraphObject#fromShortLength property of the #fromPort.getter/setter pair - fromSpot ↔ Spot
-
Available on GraphObject, provided by the GraphObject$Typings extension
Gets or sets where a link should connect from this port. The default value is Spot.None, meaning that the link routing must consider the shape of the port and connect at the closest point.getter/setter pair - fromSpot ↔ Spot
-
Available on Link, provided by the Link$Typings extension
Gets or sets where this link should connect at the #fromPort. The default value is Spot.Default, meaning that the value actually comes from the GraphObject#fromSpot property of the #fromPort.getter/setter pair - geometry ↔ Geometry
-
Available on Link, provided by the Link$Typings extension
This read-only property returns the Geometry that is used by the #path, the link Shape based on the route points.getter/setter pair - graduatedMax ↔ num
-
Available on Panel, provided by the Panel$Typings extension
For Panel.Graduated|Graduated Panels: Gets or sets the maximum value represented. Must be greater than #graduatedMin. The default is 100.getter/setter pair - graduatedMin ↔ num
-
Available on Panel, provided by the Panel$Typings extension
For Panel.Graduated|Graduated Panels: Gets or sets the minimum value represented. Must be less than #graduatedMax. The default is 0.getter/setter pair - graduatedRange ↔ num
-
Available on Panel, provided by the Panel$Typings extension
For Panel.Graduated|Graduated Panels: This read-only property returns the range of values represented by the Panel.getter/setter pair - graduatedTickBase ↔ num
-
Available on Panel, provided by the Panel$Typings extension
For Panel.Graduated|Graduated Panels: Gets or sets the base value which is marked with a tick. The default is 0.getter/setter pair - graduatedTickUnit ↔ num
-
Available on Panel, provided by the Panel$Typings extension
For Panel.Graduated|Graduated Panels: Gets or sets the difference between two consecutive values marked by ticks. Must be positive. The default is 10.getter/setter pair - gridCellSize ↔ Size
-
Available on Panel, provided by the Panel$Typings extension
For Panel.Grid|Grid Panels: Gets or sets the distance between lines. The units are in local coordinates. The default is 10x10. Any new width or height must be a positive real number.getter/setter pair - gridOrigin ↔ Point
-
Available on Panel, provided by the Panel$Typings extension
For Panel.Grid|Grid Panels: Gets or sets an origin point for the grid cells. The units are in local coordinates. The default is (0,0). Any new value must use real numbers.getter/setter pair - groupable ↔ bool
-
Available on Part, provided by the Part$Typings extension
Gets or sets whether the user may group this part to be a member of a new Group. The initial value is true.getter/setter pair - hashCode → int
-
The hash code for this object.
no setterinherited
- height ↔ num
-
Available on GraphObject, provided by the GraphObject$Typings extension
Gets or sets the desired height of this GraphObject in local coordinates. This just gets or sets the height component of the #desiredSize. Default is NaN.getter/setter pair - highlightedChanged ↔ void Function(Part)?
-
Available on Part, provided by the Part$Typings extension
Gets or sets the function to execute when this #isHighlighted changes. It is typically used to modify the appearance of the part. This function must not highlight or unhighlight any parts.getter/setter pair - isActionable ↔ bool
-
Available on GraphObject, provided by the GraphObject$Typings extension
This property determines whether or not this GraphObject's events occur before all other events, including selection. This enables the #actionDown, #actionMove, #actionUp, and #actionCancel events, which are all handled by the ActionTool.getter/setter pair - isAnimated ↔ bool
-
Available on Part, provided by the Part$Typings extension
Gets or sets whether this part may be animated. The initial value is true.getter/setter pair - isAvoiding ↔ bool
-
Available on Link, provided by the Link$Typings extension
(undocumented) This read-only property is true when the routing tries to be smart about not overlapping other parts.getter/setter pair - isClipping ↔ bool
-
Available on Panel, provided by the Panel$Typings extension
For Spot Panels: Gets or sets whether this Panel's main element clips instead of fills. The main element will not paint its stroke, if it has any. This assumes that the main element is a Shape.getter/setter pair - isEnabled ↔ bool
-
Available on Panel, provided by the Panel$Typings extension
Gets or sets whether this Panel or any GraphObject inside the panel actually responds to user click events. It may be used as a Binding target. See how this property is used in Buttons.js.getter/setter pair - isHighlighted ↔ bool
-
Available on Part, provided by the Part$Typings extension
Gets or sets whether this Part is highlighted. The initial value is false.getter/setter pair - isInDocumentBounds ↔ bool
-
Available on Part, provided by the Part$Typings extension
Gets or sets whether this Part is part of the document bounds.getter/setter pair - isLabeledLink ↔ bool
-
Available on Link, provided by the Link$Typings extension
This read-only property is true when this Link has any label Nodes, Nodes that are owned by this Link and are arranged along its path in the same manner as elements of the Link Panel.getter/setter pair - isLayoutPositioned ↔ bool
-
Available on Part, provided by the Part$Typings extension
Gets or sets whether a Layout positions this Node or routes this Link. This property affects the value of #canLayout.getter/setter pair - isOpposite ↔ bool
-
Available on Panel, provided by the Panel$Typings extension
For Panel.Horizontal|Horizontal and Panel.Vertical|Vertical Panels: gets or sets whether this Panel arranges its contents from the typical side (left and top, respectively), or the opposite side (right and bottom, respectively).getter/setter pair - isOrthogonal ↔ bool
-
Available on Link, provided by the Link$Typings extension
This read-only property is true if #routing is a value that implies that the points of the route should be orthogonal, such that each point shares a common X or a common Y value with the immediately previous and next points. This property is completely dependent on the #routing property. Values of Link.Orthogonal and Link.AvoidsNodes causes this property to be true.getter/setter pair - isPanelMain ↔ bool
-
Available on GraphObject, provided by the GraphObject$Typings extension
Gets or sets whether a GraphObject is the "main" object for some types of Panel. Panels that use a "main" object include Panel.Auto, Panel.Spot, and Panel.Link.getter/setter pair - isSelected ↔ bool
-
Available on Part, provided by the Part$Typings extension
Gets or sets whether this Part is selected. The initial value is false.getter/setter pair - isShadowed ↔ bool
-
Available on Part, provided by the Part$Typings extension
Gets or sets whether this part will draw shadows. The initial value is false.getter/setter pair - isTopLevel ↔ bool
-
Available on Part, provided by the Part$Typings extension
This read-only property is true when this part is not member of any Group node nor is it a label node for a Link.getter/setter pair - isTreeLink ↔ bool
-
Available on Link, provided by the Link$Typings extension
Gets or sets whether this Link is part of the tree for tree operations such as Node#findTreeChildrenNodes or Node#collapseTree.getter/setter pair - itemArray ↔ Array?
-
Available on Panel, provided by the Panel$Typings extension
Gets or sets a JavaScript Array of values or objects, each of which will be represented by a Panel as elements in this Panel. Replacing this array results all of this panel's child objects being replaced with a copy of the Panel found in #itemTemplateMap for each particular item in the Array.getter/setter pair - itemCategoryProperty ↔ Object
-
Available on Panel, provided by the Panel$Typings extension
Gets or sets the name of the item data property that returns a string describing that data's category, or a function that takes an item data object and returns that string; the default value is the name 'category'. This is used to distinguish between different kinds of items in the #itemArray.getter/setter pair - itemIndex ↔ num
-
Available on Panel, provided by the Panel$Typings extension
Gets the index of this Panel's data if it was created to represent an item in its containing Panel's Panel#itemArray. The default value is NaN.getter/setter pair - itemTemplate ↔ Panel
-
Available on Panel, provided by the Panel$Typings extension
Gets or sets the default Panel template used as the archetype for item data that are in #itemArray.getter/setter pair -
itemTemplateMap
↔ Map<
String, Panel> ? -
Available on Panel, provided by the Panel$Typings extension
Gets or sets a Map mapping template names to Panels. One of these Panels is copied for each item data that is in the #itemArray. Replacing this map will automatically rebuild all of the elements in this Panel.getter/setter pair - key ↔ dynamic
-
Available on Part, provided by the Part$Typings extension
This read-only property returns the Part's Model data key if it is in a Diagram and is backed by Model data. Otherwise this returns undefined.getter/setter pair - key ↔ dynamic
-
Available on Link, provided by the Link$Typings extension
This read-only property returns the Links's Model data key if it is in a Diagram and is backed by Model data. Otherwise this returns undefined.getter/setter pair -
labelNodes
↔ Iterator<
Node> -
Available on Link, provided by the Link$Typings extension
This read-only property returns an iterator over the Nodes that act as labels on this Link. Setting Node#labeledLink to refer to this Link will add that Node to this collection.getter/setter pair - lastPickIndex ↔ num
-
Available on Link, provided by the Link$Typings extension
(undocumented)getter/setter pair - layer ↔ Layer?
-
Available on Part, provided by the Part$Typings extension
This read-only property returns the Layer that this Part is in. The value is the Layer that is named with the value of #layerName. If you want to change what Layer this Part is in, change the value of #layerName to refer to a different Layer.getter/setter pair - layer ↔ Layer?
-
Available on GraphObject, provided by the GraphObject$Typings extension
This read-only property returns the GraphObject's containing Layer, if there is any. A plain GraphObject cannot belong directly to a Layer -- only a Part can belong directly to a Layer.getter/setter pair - layerChanged ↔ void Function(Part, [Layer?, Layer?])?
-
Available on Part, provided by the Part$Typings extension
Gets or sets the function to execute when this part changes layers. It is typically used to modify the appearance of the part. This function must not change the layer of this part by setting #layerName.getter/setter pair - layerName ↔ String
-
Available on Part, provided by the Part$Typings extension
Gets or sets the layer name for this part. The initial value is an empty string, which is the name of the default layer. The value of this property determines the value of #layer.getter/setter pair - layoutConditions ↔ num
-
Available on Part, provided by the Part$Typings extension
Gets or sets flags that control when the Layout that is responsible for this Part is invalidated. The initial value is Part.LayoutStandard, which causes the layout for this part to be invalidated when the part is added or removed or changes visibility or size.getter/setter pair - leftIndex ↔ num
-
Available on Panel, provided by the Panel$Typings extension
For Panel.Table|Table Panels: Gets or sets the first column that this Panel displays. The default value is 0.getter/setter pair - location ↔ Point
-
Available on Part, provided by the Part$Typings extension
Gets or sets the position of this part in document coordinates, based on the #locationSpot in this part's #locationObject.getter/setter pair - locationObject ↔ GraphObject
-
Available on Part, provided by the Part$Typings extension
This read-only property returns the GraphObject that determines the location of this Part. The value will be in the visual tree of this Part and is usually named with the value of #locationObjectName.getter/setter pair - locationObjectName ↔ String
-
Available on Part, provided by the Part$Typings extension
Gets or sets the name of the GraphObject that provides the location of this Part. This name determines the value of #locationObject. The actual #location also depends on the #locationSpot.getter/setter pair - locationSpot ↔ Spot
-
Available on Part, provided by the Part$Typings extension
Gets or sets the location Spot of this Node, the spot on the #locationObject that is used in positioning this part in the diagram.getter/setter pair - margin ↔ Object
-
Available on GraphObject, provided by the GraphObject$Typings extension
Gets or sets the size of empty area around this GraphObject, as a Margin, in the containing Panel coordinates.getter/setter pair - maxLocation ↔ Point
-
Available on Part, provided by the Part$Typings extension
Gets or sets the maximum location of this Part to which the user may drag using the DraggingTool.getter/setter pair - maxSize ↔ Size
-
Available on GraphObject, provided by the GraphObject$Typings extension
Gets or sets the maximum size of this GraphObject in container coordinates (either a Panel or the document). Any new value must be of type Size; NaN values are treated as Infinity. If you want no maximum width or height, use NaN or Infinity.getter/setter pair - measuredBounds ↔ Rect
-
Available on GraphObject, provided by the GraphObject$Typings extension
This read-only property returns the measuredBounds of the GraphObject in container coordinates (either a Panel or the document). This describes the transformed bounds with margins excluded.getter/setter pair - midAngle ↔ num
-
Available on Link, provided by the Link$Typings extension
This read-only property returns the angle of the path at the #midPoint.getter/setter pair - midPoint ↔ Point
-
Available on Link, provided by the Link$Typings extension
This read-only property returns the point at the middle of the path, in document coordinates.getter/setter pair - minLocation ↔ Point
-
Available on Part, provided by the Part$Typings extension
Gets or sets the minimum location of this Part to which the user may drag using the DraggingTool.getter/setter pair - minSize ↔ Size
-
Available on GraphObject, provided by the GraphObject$Typings extension
Gets or sets the minimum size of this GraphObject in container coordinates (either a Panel or the document). Any new value must be of type Size; NaN values are treated as 0.getter/setter pair - mouseDragEnter ↔ void Function(InputEvent, GraphObject, GraphObject)?
-
Available on GraphObject, provided by the GraphObject$Typings extension
Gets or sets the function to execute when the user moves the mouse into this stationary object during a DraggingTool drag; this allows you to provide feedback during a drag based on where it might drop.getter/setter pair - mouseDragLeave ↔ void Function(InputEvent, GraphObject, GraphObject)?
-
Available on GraphObject, provided by the GraphObject$Typings extension
Gets or sets the function to execute when the user moves the mouse out of this stationary object during a DraggingTool drag; this allows you to provide feedback during a drag based on where it might drop.getter/setter pair - mouseDrop ↔ void Function(InputEvent, GraphObject)?
-
Available on GraphObject, provided by the GraphObject$Typings extension
Gets or sets the function to execute when a user drops the selection on this object at the end of a DraggingTool drag; this allows you to customize the behavior when a drop occurs on an object.getter/setter pair - mouseEnter ↔ void Function(InputEvent, GraphObject, GraphObject)?
-
Available on GraphObject, provided by the GraphObject$Typings extension
Gets or sets the function to execute when the user moves the mouse into this object without holding down any buttons. This property is used by the ToolManager.getter/setter pair - mouseHold ↔ void Function(InputEvent, GraphObject)?
-
Available on GraphObject, provided by the GraphObject$Typings extension
Gets or sets the function to execute when the user holds the mouse still for a while over this object while holding down a button. This property is used by the ToolManager.getter/setter pair - mouseHover ↔ void Function(InputEvent, GraphObject)?
-
Available on GraphObject, provided by the GraphObject$Typings extension
Gets or sets the function to execute when the user holds the mouse still for a while over this object without holding down any buttons. This property is used by the ToolManager.getter/setter pair - mouseLeave ↔ void Function(InputEvent, GraphObject, GraphObject)?
-
Available on GraphObject, provided by the GraphObject$Typings extension
Gets or sets the function to execute when the user moves the mouse out of this object without holding down any buttons. This property is used by the ToolManager.getter/setter pair - mouseOver ↔ void Function(InputEvent, GraphObject)?
-
Available on GraphObject, provided by the GraphObject$Typings extension
Gets or sets the function to execute when the user moves the mouse over this object without holding down any buttons. This property is used by the ToolManager. This property is infrequently used -- it is more common to implement #mouseEnter and #mouseLeave functions.getter/setter pair - movable ↔ bool
-
Available on Part, provided by the Part$Typings extension
Gets or sets whether the user may move this part. The initial value is true.getter/setter pair - name ↔ String
-
Available on GraphObject, provided by the GraphObject$Typings extension
Gets or sets the name for this object. The default value is the empty string. The name should be unique within a Panel, although if it isn't, it reduces the usefulness of methods such as Panel#findObject.getter/setter pair - naturalBounds ↔ Rect
-
Available on GraphObject, provided by the GraphObject$Typings extension
This read-only property returns the natural bounding rectangle of this GraphObject in local coordinates, before any transformation by #scale or #angle. Defaults to unknown (NaN,NaN).getter/setter pair - opacity ↔ num
-
Available on GraphObject, provided by the GraphObject$Typings extension
Gets or sets the multiplicative opacity for this GraphObject and (if a Panel) all elements. The value must be between 0.0 (fully transparent) and 1.0 (no additional transparency).getter/setter pair - padding ↔ Object
-
Available on Panel, provided by the Panel$Typings extension
Gets or sets the space between this Panel's border and its content. Unlike GraphObject#margin, padding expands the area inside of the Panel's border. If this Panel's size is unconstrained, this will increase the size of the panel. If this Panel's size is constrained, this will decrease the total area for the Panel elements to arrange themselves.getter/setter pair - panel ↔ Panel?
-
Available on GraphObject, provided by the GraphObject$Typings extension
This read-only property returns the GraphObject's containing Panel, or null if this object is not in a Panel.getter/setter pair - panelLayoutState ↔ dynamic
-
Available on Panel, provided by the Panel$Typings extension
Undocumented state for PanelLayoutsgetter/setter pair - part ↔ Part?
-
Available on GraphObject, provided by the GraphObject$Typings extension
This read-only property returns the Part containing this object, if any. The Part will be the root GraphObject in this GraphObject's visual tree.getter/setter pair - path ↔ Shape?
-
Available on Link, provided by the Link$Typings extension
This read-only property returns the main Shape representing the path of this Link.getter/setter pair - pickable ↔ bool
-
Available on GraphObject, provided by the GraphObject$Typings extension
Gets or sets whether or not this GraphObject can be chosen by visual "find" or "hit-test" methods such as Diagram#findObjectAt.getter/setter pair -
points
↔ List<
Point> -
Available on Link, provided by the Link$Typings extension
Gets or sets the List of Points in the route. All of the Points must be Point#isReal -- no NaN or infinite values -- and all of the points are in document coordinates. Although this list may be replaced by setting this property, one must not modify the contents of the List directly.getter/setter pair - pointsCount ↔ num
-
Available on Link, provided by the Link$Typings extension
This read-only property returns the number of points in the route.getter/setter pair - portId ↔ String
-
Available on GraphObject, provided by the GraphObject$Typings extension
Gets or sets an identifier for an object acting as a port on a Node. The default value is null -- this object is not a port.getter/setter pair - position ↔ Point
-
Available on GraphObject, provided by the GraphObject$Typings extension
Gets or sets the position of this GraphObject in container coordinates (either a Panel or the document). Value must be of type Point. You cannot modify the x or y of the value of this property -- if you want to change the position you must set this property to a different Point. Default isPoint(NaN, NaN)
.getter/setter pair - relinkableFrom ↔ bool
-
Available on Link, provided by the Link$Typings extension
Gets or sets whether the user may reconnect an existing link at the "from" end. This affects the behavior of the RelinkingTool.getter/setter pair - relinkableTo ↔ bool
-
Available on Link, provided by the Link$Typings extension
Gets or sets whether the user may reconnect an existing link at the "to" end. This affects the behavior of the RelinkingTool.getter/setter pair - resegmentable ↔ bool
-
Available on Link, provided by the Link$Typings extension
Gets or sets whether the user may change the number of segments in this Link, if the link has straight segments. This affects the behavior of the LinkReshapingTool when #curve is not Link.Bezier.getter/setter pair - reshapable ↔ bool
-
Available on Part, provided by the Part$Typings extension
Gets or sets whether the user may reshape this part. The initial value is false.getter/setter pair - resizable ↔ bool
-
Available on Part, provided by the Part$Typings extension
Gets or sets whether the user may resize this part. The initial value is false.getter/setter pair - resizeAdornmentTemplate ↔ Adornment?
-
Available on Part, provided by the Part$Typings extension
Gets or sets the adornment template used to create a resize handle Adornment for this part. This is used by the ResizingTool, ToolManager#resizingTool.getter/setter pair - resizeCellSize ↔ Size
-
Available on Part, provided by the Part$Typings extension
Gets or sets the width and height multiples used when resizing. By default this property is the Size(NaN, NaN).getter/setter pair - resizeObject ↔ GraphObject
-
Available on Part, provided by the Part$Typings extension
This read-only property returns the GraphObject that should get resize handles when this part is selected. The value will be in the visual tree of this Part and is usually named with the value of #resizeObjectName.getter/setter pair - resizeObjectName ↔ String
-
Available on Part, provided by the Part$Typings extension
Gets or sets the name of the GraphObject that should get a resize handle when this part is selected. The value of this property affects the value of #resizeObject. The initial value is an empty string, meaning the whole Part itself gets any resize handle.getter/setter pair - rotatable ↔ bool
-
Available on Part, provided by the Part$Typings extension
Gets or sets whether the user may rotate this part. The initial value is false.getter/setter pair - rotateAdornmentTemplate ↔ Adornment?
-
Available on Part, provided by the Part$Typings extension
Gets or sets the adornment template used to create a rotation handle Adornment for this part. This is used by the RotatingTool, ToolManager#rotatingTool.getter/setter pair - rotateObject ↔ GraphObject
-
Available on Part, provided by the Part$Typings extension
This read-only property returns the GraphObject that should get rotate handles when this part is selected. The value will be in the visual tree of this Part and is usually named with the value of #rotateObjectName.getter/setter pair - rotateObjectName ↔ String
-
Available on Part, provided by the Part$Typings extension
Gets or sets the name of the GraphObject that should get a rotate handle when this part is selected. The value of this property affects the value of #rotateObject. The initial value is an empty string, meaning the whole Part itself gets any rotate handle.getter/setter pair - rotationSpot ↔ Spot
-
Available on Part, provided by the Part$Typings extension
Gets or sets the spot on the #rotateObject that is used in rotating this part with the RotatingTool.getter/setter pair - routeBounds ↔ Rect
-
Available on Link, provided by the Link$Typings extension
This read-only property returns the bounds of the link geometry in document coordinates.getter/setter pair - routing ↔ EnumValue
-
Available on Link, provided by the Link$Typings extension
Gets or sets whether the link's path tries to avoid other nodes. The value must be one of Link.Normal|Normal, Link.Orthogonal|Orthogonal, or Link.AvoidsNodes|AvoidsNodes.getter/setter pair - row ↔ num
-
Available on GraphObject, provided by the GraphObject$Typings extension
Gets or sets the row of this GraphObject if it is in a Table Panel. The value must be a small non-negative integer. The default is 0.getter/setter pair - rowCount ↔ num
-
Available on Panel, provided by the Panel$Typings extension
For Panel.Table|Table Panels: This read-only property returns the number of rows. This value is only valid after the Panel has been measured.getter/setter pair - rowSizing ↔ EnumValue
-
Available on Panel, provided by the Panel$Typings extension
For Panel.Table|Table Panels: Gets or sets how this Panel's rows deal with extra space. Valid values are RowColumnDefinition.ProportionalExtra and RowColumnDefinition.None. The default is RowColumnDefinition.ProportionalExtra.getter/setter pair - rowSpan ↔ num
-
Available on GraphObject, provided by the GraphObject$Typings extension
Gets or sets the number of rows spanned by this GraphObject if it is in a Table Panel. The value must be a small positive integer. The default is 1.getter/setter pair - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- scale ↔ num
-
Available on GraphObject, provided by the GraphObject$Typings extension
Gets or sets the scale transform of this GraphObject. Value must be a number; larger values will make this object appear bigger. Default is 1.getter/setter pair - segmentFraction ↔ num
-
Available on GraphObject, provided by the GraphObject$Typings extension
Gets or sets the fractional distance along a segment of a GraphObject that is in a Link. The value should be between zero and one, where zero is at the point at the start of the segment, and where one is at the point at the end of the segment. The default value is zero.getter/setter pair - segmentIndex ↔ num
-
Available on GraphObject, provided by the GraphObject$Typings extension
Gets or sets the segment index of a GraphObject that is in a Link. Non-negative numbers count up from zero, which is the first segment, at the "from" end of the Link. Negative numbers count segments from the "to" end of the Link, where -1 means the last segment and -2 means the next-to-last segment. The default value is -Infinity. The value should be an integer or NaN.getter/setter pair - segmentOffset ↔ Point
-
Available on GraphObject, provided by the GraphObject$Typings extension
Gets or sets the offset of a GraphObject that is in a Link from a point on a segment or in a Panel.Graduated from a point along the main element. The X component of the Point indicates the distance along the route, with positive values going further toward the "to" end of the link or panel. The Y component of the Point indicates the distance away from the route, with positive values towards the right as seen when facing further towards the "to" end of the link or panel. The value defaults to the Point (0, 0). You cannot modify the x or y of the value of this property -- if you want to change the segmentOffset you must set this property to a different Point.getter/setter pair - segmentOrientation ↔ EnumValue
-
Available on GraphObject, provided by the GraphObject$Typings extension
Gets or sets the orientation of a GraphObject that is in a Link or Panel.Graduated. This controls the automatic rotation of the object by the Link Panel or Graduated Panel. The only accepted values are the Link "Orient..." values of Link and the default value: Link.None.getter/setter pair - selectable ↔ bool
-
Available on Part, provided by the Part$Typings extension
Gets or sets whether the user may select this part. The initial value is true.getter/setter pair - selectionAdorned ↔ bool
-
Available on Part, provided by the Part$Typings extension
Gets or sets whether a selection adornment is shown for this part when it is selected. The initial value is true.getter/setter pair - selectionAdornmentTemplate ↔ Adornment?
-
Available on Part, provided by the Part$Typings extension
Gets or sets the Adornment template used to create a selection handle for this Part.getter/setter pair - selectionChanged ↔ void Function(Part)?
-
Available on Part, provided by the Part$Typings extension
Gets or sets the function to execute when this part is selected or deselected. It is typically used to modify the appearance of the part. This function must not select or deselect any parts.getter/setter pair - selectionObject ↔ GraphObject
-
Available on Part, provided by the Part$Typings extension
This read-only property returns the GraphObject that should get a selection handle when this part is selected. The value will be in the visual tree of this Part and is usually named with the value of #selectionObjectName. When the #selectionObjectName is unspecified, this whole Part is used as the "selection object".getter/setter pair - selectionObjectName ↔ String
-
Available on Part, provided by the Part$Typings extension
Gets or sets the name of the GraphObject that should get a selection handle when this part is selected. The value of this property affects the value of #selectionObject. The initial value is an empty string, meaning the whole Part itself gets any selection handle.getter/setter pair - shadowBlur ↔ num
-
Available on Part, provided by the Part$Typings extension
Gets or sets the numerical value that describes the shadow's blur. Number must be non-negative and non-infinity. A value of 0 would mean the shadow does not blur and larger numbers represent increasingly more blur. The total blur area is independent of the Part's area and can become quite large as this number is increased.getter/setter pair - shadowColor ↔ String
-
Available on Part, provided by the Part$Typings extension
Gets or sets the CSS string that describes a shadow color. Default is 'gray'. Brushes cannot be used for this property -- only strings.getter/setter pair - shadowOffset ↔ Point
-
Available on Part, provided by the Part$Typings extension
Gets or sets the X and Y offset of this part's shadow. This is only relevant if #isShadowed is true. The initial value is (6, 6).getter/setter pair - shadowVisible ↔ bool?
-
Available on GraphObject, provided by the GraphObject$Typings extension
Gets or sets whether or not this GraphObject will be shadowed inside a Part that has Part#isShadowed set to true.getter/setter pair - smoothness ↔ num
-
Available on Link, provided by the Link$Typings extension
Gets or sets how far the control points are from the points of the route when #routing is Link.Orthogonal|Orthogonal and #curve is Link.Bezier|Bezier.getter/setter pair - spanAllocation ↔ num Function(GraphObject, RowColumnDefinition, num)?
-
Available on GraphObject, provided by the GraphObject$Typings extension
(undocumented)getter/setter pair - stretch ↔ EnumValue
-
Available on GraphObject, provided by the GraphObject$Typings extension
Gets or sets the stretch of the GraphObject. This controls whether the width and/or height of this object automatically adjusts to fill the area allotted by the containing Panel.getter/setter pair - text ↔ String
-
Available on Part, provided by the Part$Typings extension
Gets or sets a text string that is associated with this part.getter/setter pair - textEditable ↔ bool
-
Available on Part, provided by the Part$Typings extension
Gets or sets whether the user may do in-place text editing on TextBlocks in this part that have TextBlock#editable set to true. The initial value is true.getter/setter pair - toEndSegmentLength ↔ num
-
Available on Link, provided by the Link$Typings extension
Gets or sets the length of the last segment. The default value is NaN, meaning that the value actually comes from the GraphObject#toEndSegmentLength property of the #toPort. This value also limits how short the #toShortLength may be drawn.getter/setter pair - toEndSegmentLength ↔ num
-
Available on GraphObject, provided by the GraphObject$Typings extension
Gets or sets the length of the last segment of a link going to this port. This value is used when the computed "to spot" is not Spot.None. The default value is 10.getter/setter pair - toLinkable ↔ bool?
-
Available on GraphObject, provided by the GraphObject$Typings extension
Gets or sets whether the user may draw Links to this port. This property is used by LinkingBaseTool#isValidTo.getter/setter pair - toLinkableDuplicates ↔ bool
-
Available on GraphObject, provided by the GraphObject$Typings extension
Gets or sets whether the user may draw duplicate Links to this port. This property is used by LinkingBaseTool#isValidLink. The default value is false.getter/setter pair - toLinkableSelfNode ↔ bool
-
Available on GraphObject, provided by the GraphObject$Typings extension
Gets or sets whether the user may draw Links that connect to this port's Node. This property is used by LinkingBaseTool#isValidLink. The default value is false.getter/setter pair - toMaxLinks ↔ num
-
Available on GraphObject, provided by the GraphObject$Typings extension
Gets or sets the maximum number of links that may go into this port. This property is used by LinkingBaseTool#isValidTo.getter/setter pair - toNode ↔ Node?
-
Available on Link, provided by the Link$Typings extension
Gets or sets the Node that this link goes to. The #toPortId specifies which port the link goes to. The default value is null -- this link is not going to any node.getter/setter pair - toolTip ↔ dynamic
-
Available on GraphObject, provided by the GraphObject$Typings extension
This Adornment or HTMLInfo is shown when the mouse hovers over this object. The default value is null, which means no tooltip is shown.getter/setter pair - topIndex ↔ num
-
Available on Panel, provided by the Panel$Typings extension
For Panel.Table|Table Panels: Gets or sets the first row that this Panel displays. The default value is 0.getter/setter pair - toPort ↔ GraphObject?
-
Available on Link, provided by the Link$Typings extension
This read-only property returns a GraphObject that is the "to" port that this link is connected to. The #toNode provides the node that the link is going to. The #toPortId provides the identifier for which port this link is going to; you can set that property in order to change the value of this property. This method may return null.getter/setter pair - toPortChanged ↔ void Function(Link, GraphObject, [GraphObject?])?
-
Available on Link, provided by the Link$Typings extension
Gets or sets the function that is called after this Link changes which Node or port it connects to. The first argument will be this Link. The second argument will be the old GraphObject port. The third argument will be the new GraphObject port.getter/setter pair - toPortId ↔ String
-
Available on Link, provided by the Link$Typings extension
Gets or sets the identifier of the port that this link goes to. The default value is the empty string.getter/setter pair - toShortLength ↔ num
-
Available on Link, provided by the Link$Typings extension
Gets or sets how far the end segment stops short of the actual port. Positive values are limited by the #toEndSegmentLength or GraphObject#toEndSegmentLength. Negative values cause the link to extend into the port. The default value is NaN -- the value actually comes from the GraphObject#toShortLength property of the #toPort.getter/setter pair - toShortLength ↔ num
-
Available on GraphObject, provided by the GraphObject$Typings extension
Gets or sets how far the end segment of a link going to this port stops short of the actual port. Positive values are limited by the #toEndSegmentLength or Link#toEndSegmentLength. Negative values cause the link to extend into the port. The default value is zero.getter/setter pair - toSpot ↔ Spot
-
Available on Link, provided by the Link$Typings extension
Gets or sets where this link should connect at the #toPort. The default value is Spot.Default, meaning that the value actually comes from the GraphObject#toSpot property of the #toPort.getter/setter pair - toSpot ↔ Spot
-
Available on GraphObject, provided by the GraphObject$Typings extension
Gets or sets where a link should connect to this port. The default value is Spot.None, meaning that the link routing must consider the shape of the port and connect to the closest point.getter/setter pair - type ↔ PanelLayout
-
Available on Panel, provided by the Panel$Typings extension
Gets or sets the type of the Panel, which controls how the Panel's elements are measured and arranged. The value must be an instance of PanelLayout. The only predefined values are listed as constant properties of Panel, including:getter/setter pair - viewboxStretch ↔ EnumValue
-
Available on Panel, provided by the Panel$Typings extension
For Panel.Viewbox|Viewbox Panels: Gets or sets how the panel will resize its content.getter/setter pair - visible ↔ bool
-
Available on GraphObject, provided by the GraphObject$Typings extension
Gets or sets whether a GraphObject is visible. The default value is true. A not visible object takes no space in the Panel that it is in. Toggling visibility may cause elements in the visual tree to re-measure and re-arrange. Making a Panel not visible causes all of its elements not to be seen or receive input events. Changing a Panel to become visible causes all of its elements to be seen and be active, unless those elements are themselves not visible.getter/setter pair - width ↔ num
-
Available on GraphObject, provided by the GraphObject$Typings extension
Gets or sets the desired width of this GraphObject in local coordinates. This just gets or sets the width component of the #desiredSize. Default is NaN.getter/setter pair - zOrder ↔ num
-
Available on Part, provided by the Part$Typings extension
Gets or sets the Z-ordering position of this Part within its Layer.getter/setter pair
Methods
-
add(
[Iterable? elements]) → Panel -
Available on Panel, provided by the Panel$Typings extension
Adds a number of GraphObjects to the end of this Panel's list of elements, visually in front of all of the other elements. -
addAdornment(
String category, Adornment ad) → void -
Available on Part, provided by the Part$Typings extension
Associate an Adornment with this Part, perhaps replacing any existing adornment of the same category. Don't forget to set Adornment#adornedObject before calling this method. This adds the Adornment to the Layer named by #layerName, normally "Adornment". -
addColumnDefinition(
num colIndex, dynamic options) → Panel -
Available on Panel, provided by the Panel$Typings extension
For Panel.Table|Table Panels: Sets the column RowColumnDefinition given by the index. If the column definition does not exist on the Panel, this will create it. If it already exists on the Panel, this will copy the properties of the given RowColumnDefinition options onto that definition. -
addOrthoPoints(
Point startFrom, num fromDir, Point endTo, num toDir, Node fromnode, Node tonode) → void -
Available on Link, provided by the Link$Typings extension
(undocumented) This method is called by #computePoints when the link is orthogonal and at least one port has a link spot that is not Spot#isNoSpot. -
addPoint(
Point p) → void -
Available on Link, provided by the Link$Typings extension
Add a point at the end of the route; this may only be called within an override of #computePoints. @param {Point} p The new point in document coordinates, which should not have infinite or NaN coordinate values, and which must not be modified afterwards. @see #getPoint @see #setPoint @see #insertPoint @see #removePoint @since 1.6 -
addPointAt(
num x, num y) → void -
Available on Link, provided by the Link$Typings extension
(undocumented) Add a point at the end of the route; this may only be called within an override of #computePoints. @param {number} x The new X, which should not be infinite or NaN, in document coordinates. @param {number} y The new Y, which should not be infinite or NaN, in document coordinates. -
addRowColumnDefinition(
RowColumnDefinition rowOrColumnDef) → Panel -
Available on Panel, provided by the Panel$Typings extension
For Panel.Table|Table Panels: Sets the given RowColumnDefinition. If the row or column definition does not exist on the Panel, this will create it. If it already exists on the Panel, this will copy the properties of the given RowColumnDefinition onto that RowColumnDefinition. @since 2.3 @param {RowColumnDefinition} rowOrColumnDef the non-negative zero-based integer column index. @return {Panel} this Panel @see #addRowDefinition @see #addColumnDefinition -
addRowDefinition(
num rowIndex, dynamic options) → Panel -
Available on Panel, provided by the Panel$Typings extension
For Panel.Table|Table Panels: Sets the row RowColumnDefinition given by the index. If the row definition does not exist on the Panel, this will create it. If it already exists on the Panel, this will copy the properties of the given RowColumnDefinition options onto that definition. -
apply(
void func(GraphObject)) → GraphObject -
Available on GraphObject, provided by the GraphObject$Typings extension
This method takes a function that can be used to apply multiple settings, bindings, or Panel#add calls, to different GraphObjects. This is common in initialization. If you are just adding settings, bindings, or GraphObjects to a single GraphObject, you do not need to use this, you can just chain calls to #set, #bind, and Panel#add instead. This method is mostly useful when setting the same values across multiple GraphObjects. -
arrangeBundledLinks(
Array< Link> links, bool reroute) → void -
Available on Link, provided by the Link$Typings extension
(undocumented) Sort the Links between two ports and invalidate their routes. Only one of the Links in the bundle will get this method called -- it is undetermined which Link is chosen. -
attach(
[dynamic config]) → GraphObject -
Available on GraphObject, provided by the GraphObject$Typings extension
This method sets a collection of properties according to the property/value pairs on the given Object, or array of Objects, in the same manner as GraphObject.make does when constructing a GraphObject. -
canCopy(
) → bool -
Available on Part, provided by the Part$Typings extension
This predicate returns true if #copyable is true, if the layer's Layer#allowCopy is true, and if the diagram's Diagram#allowCopy is true. -
canDelete(
) → bool -
Available on Part, provided by the Part$Typings extension
This predicate returns true if #deletable is true, if the layer's Layer#allowDelete is true, and if the diagram's Diagram#allowDelete is true. -
canEdit(
) → bool -
Available on Part, provided by the Part$Typings extension
This predicate returns true if #textEditable is true, if the layer's Layer#allowTextEdit is true, and if the diagram's Diagram#allowTextEdit is true. -
canGroup(
) → bool -
Available on Part, provided by the Part$Typings extension
This predicate returns true if #groupable is true, if the layer's Layer#allowGroup is true, and if the diagram's Diagram#allowGroup is true. -
canLayout(
) → bool -
Available on Part, provided by the Part$Typings extension
This predicate is called by Layout implementations to decide whether this Part should be positioned and might affect the positioning of other Parts. -
canMove(
) → bool -
Available on Part, provided by the Part$Typings extension
This predicate returns true if #movable is true, if the layer's Layer#allowMove is true, and if the diagram's Diagram#allowMove is true. -
canRelinkFrom(
) → bool -
Available on Link, provided by the Link$Typings extension
This predicate returns true if #relinkableFrom is true, if the layer's Layer#allowRelink is true, and if the diagram's Diagram#allowRelink is true. -
canRelinkTo(
) → bool -
Available on Link, provided by the Link$Typings extension
This predicate returns true if #relinkableTo is true, if the layer's Layer#allowRelink is true, and if the diagram's Diagram#allowRelink is true. -
canReshape(
) → bool -
Available on Part, provided by the Part$Typings extension
This predicate returns true if #reshapable is true, if the layer's Layer#allowReshape is true, and if the diagram's Diagram#allowReshape is true. -
canResize(
) → bool -
Available on Part, provided by the Part$Typings extension
This predicate returns true if #resizable is true, if the layer's Layer#allowResize is true, and if the diagram's Diagram#allowResize is true. -
canRotate(
) → bool -
Available on Part, provided by the Part$Typings extension
This predicate returns true if #rotatable is true, if the layer's Layer#allowRotate is true, and if the diagram's Diagram#allowRotate is true. -
canSelect(
) → bool -
Available on Part, provided by the Part$Typings extension
This predicate returns true if #selectable is true, if the layer's Layer#allowSelect is true, and if the diagram's Diagram#allowSelect is true. -
clearAdornments(
) → void -
Available on Part, provided by the Part$Typings extension
Remove all adornments associated with this part. -
clearPoints(
) → void -
Available on Link, provided by the Link$Typings extension
Remove all of the points from this link's route; this may only be called within an override of #computePoints. @see #getPoint @see #setPoint @see #insertPoint @see #addPoint @see #removePoint @since 1.6 -
cloneProtected(
GraphObject copy) → void -
Available on GraphObject, provided by the GraphObject$Typings extension
Copies properties from this object to the given object, which must be of the same class. This is called by #copy. This method may be overridden. -
commitRoute(
) → void -
Available on Link, provided by the Link$Typings extension
(undocumented) Call this method after a call to #startRoute and calls to methods that modify the route. -
computeAdjusting(
) → EnumValue -
Available on Link, provided by the Link$Typings extension
Returns the #adjusting value, unless this Link's Diagram is animating and the routing is AvoidsNodes -- then it will return Link.End|End -
computeCorner(
) → num -
Available on Link, provided by the Link$Typings extension
(undocumented) Returns the #corner, if it's a non-negative number, or else 10. -
computeCurve(
) → EnumValue -
Available on Link, provided by the Link$Typings extension
Returns the #curve, unless this link is supposed to pretend to be curved, as with reflexive links. -
computeCurviness(
) → num -
Available on Link, provided by the Link$Typings extension
Returns the #curviness, if it's a number, or else a computed value based on how many links connect this pair of nodes/ports, by calling #computeSpacing on each link. -
computeEndSegmentLength(
Spot spot, bool from, [Node? node, GraphObject? port]) → num -
Available on Link, provided by the Link$Typings extension
Get the length of the end segment in document coordinates, typically a short distance, in document units. For spot values that are Spot#isSide, this returns a computed value. Depending on thefrom
argument, this will return #fromEndSegmentLength or #toEndSegmentLength. If the value isNaN
, this will return the #fromPort's GraphObject#fromEndSegmentLength or the #toPort's GraphObject#toEndSegmentLength. -
computeMidOrthoPosition(
num fromX, num fromY, num toX, num toY, bool vertical) → num -
Available on Link, provided by the Link$Typings extension
(undocumented) This method is called by #addOrthoPoints to determine the distance of the middle segment between the two ports. -
computeOtherPoint(
Node othernode, GraphObject otherport) → Point -
Available on Link, provided by the Link$Typings extension
Find the approximate point of the other end of the link in document coordinates. This is useful when computing the connection point when there is no specific spot, to have an idea of which general direction the link should be going. By default this will return the center of the other port. -
computePoints(
) → bool -
Available on Link, provided by the Link$Typings extension
The code that constructs a new route by modifying the #points. It is only called by #updateRoute, when needed. All route points are always in document coordinates. -
computeShortLength(
bool from) → num -
Available on Link, provided by the Link$Typings extension
(undocumented) -
computeSpacing(
) → num -
Available on Link, provided by the Link$Typings extension
Returns the expected spacing between this link and others that connect this link's fromPort and toPort. This calls #computeThickness and also takes any "mid label"'s breadth into account. -
computeSpot(
bool from, [GraphObject? port]) → Spot -
Available on Link, provided by the Link$Typings extension
Get the Spot that describes how the end of the link should connect with the port. Depending on thefrom
argument, this will return #fromSpot or #toSpot. If the value is Spot#isDefault, this will return the #fromPort's GraphObject#fromSpot or the #toPort's GraphObject#toSpot. -
computeThickness(
) → num -
Available on Link, provided by the Link$Typings extension
Returns the thickness of this link. By default it uses the strokeWidth of the main element, assuming it's a Shape. This is called by #computeSpacing. -
copy(
) → GraphObject -
Available on GraphObject, provided by the GraphObject$Typings extension
Creates a deep copy of this GraphObject and returns it. This method is the same as a clone for simple GraphObjects such as Shape, TextBlock, and Picture. For Panel this method copies the visual tree of GraphObjects that it contains. @expose @return {GraphObject} -
copy(
) → Panel -
Available on Panel, provided by the Panel$Typings extension
Creates a deep copy of this Panel and returns it. @return {Panel} -
copyTemplate(
[bool? freeze]) → Panel -
Available on Panel, provided by the Panel$Typings extension
Make a deep copy of this Panel and allow it to be used as a template. This makes copies of Bindings, unlike the regularcopy()
method. Pass true as the argument in order to freeze the Bindings, allowing it to operate efficiently as a template. A false value (which is the default) allows further additions/modifications of the bindings in the copied Panel. @since 2.2 @param {boolean=} freeze whether to freeze the Bindings in the copy; default is false @return {Panel} -
elt(
num idx) → GraphObject -
Available on Panel, provided by the Panel$Typings extension
Returns the GraphObject in this Panel's list of elements at the specified index. @param {number} idx @return {GraphObject} -
ensureBounds(
) → void -
Available on Part, provided by the Part$Typings extension
Measures if needed to make sure the GraphObject#measuredBounds and GraphObject#naturalBounds are all real numbers, primarily to get the actual width and height. GraphObject#actualBounds will get a real width and height, but the x and y values may continue to beNaN
if they were that way beforehand. -
findAdornment(
String category) → Adornment? -
Available on Part, provided by the Part$Typings extension
Find an Adornment of a given category associated with this Part. -
findBindingPanel(
) → Panel? -
Available on GraphObject, provided by the GraphObject$Typings extension
Walks up the visual tree and returns the first Panel whose Panel.data is bound to data. This can be useful when you need to inspect Panel#data objects. @since 2.2 @return {Panel} -
findClosestSegment(
Point p) → num -
Available on Link, provided by the Link$Typings extension
Find the index of the segment that is closest to a given point. This assumes the route only has straight line segments. It ignores any jump-overs or jump-gaps. @param {Point} p the Point, in document coordinates. @return {number} int the index of the segment, from zero to the number of points minus 2. -
findColumnForLocalX(
num x) → num -
Available on Panel, provided by the Panel$Typings extension
For Panel.Table|Table Panels: Returns the cell at a given x-coordinate in local coordinates, or -1 if there are no RowColumnDefinitions for this Table Panel or if the argument is negative. Call GraphObject#getLocalPoint to convert a Point in document coordinates into a Point in local coordinates. -
findCommonContainingGroup(
Part other) → Group? -
Available on Part, provided by the Part$Typings extension
Find the Group that perhaps indirectly contains both this part and another one. If this is a Group and it contains the OTHER Part, return this. If the OTHER Part is a Group and it contains this Part, return that OTHER Part. -
findItemPanelForData(
Object data) → Panel? -
Available on Panel, provided by the Panel$Typings extension
Return the Panel that was made for a particular data object in this panel's #itemArray. If this returns a Panel, its #data property will be the argument data object, and its containing GraphObject#panel will be this panel. @param {Object} data must be an Object, not a string or a number or a boolean or a function @return {Panel} or null if not found @since 1.6 -
findMainElement(
) → GraphObject? -
Available on Panel, provided by the Panel$Typings extension
Return an immediate child element whose GraphObject#isPanelMain is true, or else just return the first child element. @return {GraphObject} this may return null if there are no child elements @since 1.5 -
findMidLabel(
) → GraphObject? -
Available on Link, provided by the Link$Typings extension
(undocumented) Returns the first label that should be at the "middle" of the link, if there is any such label. Elements that have .isPanelMain === true are ignored, including the #path. Elements that have a GraphObject#segmentIndex set are ignored, such as arrowheads. If there are no label objects within the Link Panel, consider any #labelNodes whose segmentIndex has not been set. This could be overridden to return a different label than the first one, or to always return null. @expose @return {GraphObject} -
findObject(
String name) → GraphObject? -
Available on Panel, provided by the Panel$Typings extension
Search the visual tree starting at this Panel for a GraphObject whose GraphObject#name is the given name. -
findRowForLocalY(
num y) → num -
Available on Panel, provided by the Panel$Typings extension
For Panel.Table|Table Panels: Returns the row at a given y-coordinate in local coordinates, or -1 if there are no RowColumnDefinitions for this Table Panel or if the argument is negative. Call GraphObject#getLocalPoint to convert a Point in document coordinates into a Point in local coordinates. -
findSubGraphLevel(
) → num -
Available on Part, provided by the Part$Typings extension
Return how deep this part is in the hierarchy of nested Groups. For parts that have no #containingGroup this returns zero. -
findTemplateBinder(
) → Panel? -
Available on GraphObject, provided by the GraphObject$Typings extension
(undocumented) This never-documented method has been renamed #findBindingPanel for v2.2 and will be removed in v3.0. @return {Panel} -
findTopLevelPart(
) → Part -
Available on Part, provided by the Part$Typings extension
Gets the top-level Part for this part, which is itself when #isTopLevel is true. If this Part is a member of a Group, this returns the top-level Part for that Group. If this is a Node that is a label node for a labeled Link, this returns the top-level Part for that Link. -
getColumnDefinition(
num idx) → RowColumnDefinition -
Available on Panel, provided by the Panel$Typings extension
For Panel.Table|Table Panels: Gets the RowColumnDefinition for a particular column. If you ask for the definition of a column at or beyond the #columnCount, it will automatically create one and return it. -
getDocumentAngle(
) → num -
Available on GraphObject, provided by the GraphObject$Typings extension
Returns the effective angle that the object is drawn at, in document coordinates, normalized to between 0 and 360. -
getDocumentBounds(
[Rect? result]) → Rect -
Available on Part, provided by the Part$Typings extension
Returns the Rect in document coordinates for this object's bounds. If this GraphObject is a Part, the rect will be identical to its #actualBounds. @param {Rect=} result an optional Rect that is modified and returned. @return {Rect} in document coordinates. @see #getDocumentPoint @since 2.0 -
getDocumentBounds(
[Rect? result]) → Rect -
Available on GraphObject, provided by the GraphObject$Typings extension
Returns the Rect in document coordinates for this object's bounds. If this GraphObject is a Part, the rect will be identical to its #actualBounds. @param {Rect=} result an optional Rect that is modified and returned. @return {Rect} in document coordinates. @see #getDocumentPoint @since 2.0 -
getDocumentPoint(
Object local, [Point? result]) → Point -
Available on GraphObject, provided by the GraphObject$Typings extension
Returns the Point in document coordinates for a given Spot in this object's bounds or for a Point in local coordinates. -
getDocumentScale(
) → num -
Available on GraphObject, provided by the GraphObject$Typings extension
Returns the total scale that the object is drawn at, in document coordinates. -
getLinkDirection(
Node? node, GraphObject? port, Point linkpoint, Spot spot, bool from, bool ortho, [Node? othernode, GraphObject? otherport]) → num -
Available on Link, provided by the Link$Typings extension
Compute the direction in which a link should go from a given connection point. @expose @param {Node} node @param {GraphObject} port the GraphObject representing a port on the node. @param {Point} linkpoint the connection point, in document coordinates. @param {Spot} spot a Spot value describing where the link should connect. @param {boolean} from true if the link is coming out of the port; false if going to the port. @param {boolean} ortho whether the link should have orthogonal segments. @param {Node} othernode the node at the other end of the link. @param {GraphObject} otherport the GraphObject port at the other end of the link. @return {number} the absolute angle, in degrees. @since 1.2 -
getLinkPoint(
Node? node, GraphObject port, Spot spot, bool from, bool ortho, Node? othernode, GraphObject otherport, [Point? result]) → Point -
Available on Link, provided by the Link$Typings extension
Compute the point on a node/port in document coordinates at which the route of a link should end. @expose @param {Node} node @param {GraphObject} port the GraphObject representing a port on the node. @param {Spot} spot a Spot value describing where the link should connect. @param {boolean} from true if the link is coming out of the port; false if going to the port. @param {boolean} ortho whether the link should have orthogonal segments. @param {Node} othernode the node at the other end of the link. @param {GraphObject} otherport the GraphObject port at the other end of the link. @param {Point=} result an optional Point that is modified and returned; otherwise it allocates and returns a new Point @return {Point} in document coordinates. @since 1.2 -
getLinkPointFromPoint(
Node? node, GraphObject? port, Point focus, Point p, bool from, [Point? result]) → Point -
Available on Link, provided by the Link$Typings extension
Compute the intersection point in document coordinates for the edge of a particular port GraphObject, given a point, when no particular spot or side has been specified. @expose @param {Node} node @param {GraphObject} port the GraphObject representing a port on the node. @param {Point} focus the point in document coordinates to/from which the link should point, normally the center of the port. @param {Point} p often this point is far away from the node, to give a general direction, particularly an orthogonal one. @param {boolean} from true if the link is coming out of the port; false if going to the port. @param {Point=} result an optional Point that is modified and returned; otherwise it allocates and returns a new Point @return {Point} the point in document coordinates of the intersection point on the edge of the port. @since 1.2 -
getLocalPoint(
Point p, [Point? result]) → Point -
Available on GraphObject, provided by the GraphObject$Typings extension
Given a Point in document coordinates, returns a new Point in local coordinates. -
getOtherNode(
Node node) → Node? -
Available on Link, provided by the Link$Typings extension
Given a Node, return the node at the other end of this link. @param {Node} node @return {Node} This may return the same node, if the link is reflexive. -
getOtherPort(
GraphObject port) → GraphObject? -
Available on Link, provided by the Link$Typings extension
Given a GraphObject that is a "port", return the port at the other end of this link. @param {GraphObject} port @return {GraphObject} This may return the same object, if the link is reflexive. -
getPoint(
num i) → Point -
Available on Link, provided by the Link$Typings extension
Gets a particular point of the route. @param {number} i int The zero-based index of the desired point. @return {Point} in document coordinates -
getRowDefinition(
num idx) → RowColumnDefinition -
Available on Panel, provided by the Panel$Typings extension
For Panel.Table|Table Panels: Gets the RowColumnDefinition for a particular row. If you ask for the definition of a row at or beyond the #rowCount, it will automatically create one and return it. -
graduatedPointForValue(
num val, [Point? result]) → Point -
Available on Panel, provided by the Panel$Typings extension
For Panel.Graduated|Graduated Panels: Returns the point that corresponds with a value, in the panel's coordinates. -
graduatedValueForPoint(
Point pt) → num -
Available on Panel, provided by the Panel$Typings extension
For Panel.Graduated|Graduated Panels: Returns the value that corresponds with the given Point. The Point must be in the panel's coordinates. The value returned will be in the Graduated Panel's range. -
hasCurviness(
) → bool -
Available on Link, provided by the Link$Typings extension
Returns true if an extra or a different point is needed based on #curviness. -
insertAt(
num index, GraphObject element) → void -
Available on Panel, provided by the Panel$Typings extension
Adds a GraphObject to the Panel's list of elements at the specified index. -
insertPoint(
num i, Point p) → void -
Available on Link, provided by the Link$Typings extension
Insert a point at a particular position in the route, without replacing an existing point; this may only be called within an override of #computePoints. @param {number} i int The zero-based index of the new point. @param {Point} p The new point in document coordinates, which should not have infinite or NaN coordinate values, and which must not be modified afterwards. @see #getPoint @see #setPoint @see #addPoint @see #removePoint @since 1.6 -
insertPointAt(
num i, num x, num y) → void -
Available on Link, provided by the Link$Typings extension
(undocumented) Insert a point at a particular position in the route, without replacing an existing point; this may only be called within an override of #computePoints. @param {number} i int The zero-based index of the new point. @param {number} x The new X, which should not be infinite or NaN, in document coordinates. @param {number} y The new Y, which should not be infinite or NaN, in document coordinates. -
invalidateAdornments(
) → void -
Available on Part, provided by the Part$Typings extension
(undocumented) -
invalidateLayout(
[num? condition]) → void -
Available on Part, provided by the Part$Typings extension
Invalidate the Layout that is responsible for positioning this Part. If this part is in a Group, invalidate its Group#layout, if it has one. Otherwise invalidate the Diagram#layout. -
invalidateRoute(
) → void -
Available on Link, provided by the Link$Typings extension
Declare that the route (the #points) of this Link need to be recomputed soon. This causes #updateRoute to be called, which will call #computePoints to perform the actual determination of the route. @since 1.6 -
isContainedBy(
GraphObject panel) → bool -
Available on GraphObject, provided by the GraphObject$Typings extension
This predicate is true if this object is an element, perhaps indirectly, of the given panel. -
isEnabledObject(
) → bool -
Available on GraphObject, provided by the GraphObject$Typings extension
This predicate is false if this object is inside any Panel that is not Panel#isEnabled, or if this is itself a disabled panel. This ignores the #visible and #pickable properties. @return {boolean} @see #enabledChanged @see Panel#isEnabled @since 1.7 -
isMemberOf(
Part part) → bool -
Available on Part, provided by the Part$Typings extension
This predicate is true if this part is a member of the given Part, perhaps indirectly. -
isVisible(
) → bool -
Available on Part, provided by the Part$Typings extension
This predicate is true if this Part can be seen. Parts that can be seen can be manipulated by the user, can take space in the document, or can take part in a layout, among many possibilities. Note that the value of this predicate can often be false even while GraphObject#visible is true. -
isVisibleObject(
) → bool -
Available on GraphObject, provided by the GraphObject$Typings extension
This predicate is true if this object is #visible and each of its visual containing panels is also visible. This ignores the actual location or appearance (except visibility) of the panel that this object is part of, as well as ignoring all properties of the Layer or Diagram. -
makeGeometry(
) → Geometry -
Available on Link, provided by the Link$Typings extension
Produce a Geometry given the points of this route, depending on the value of #curve and #corner and perhaps other properties. The points of the Geometry are in local coordinates, whereas the #points of the link route are in document coordinates. -
move(
Point newpos, [bool? useLocation]) → void -
Available on Link, provided by the Link$Typings extension
Move this link to a new position. This also shifts all of the Points in the route accordingly. This also moves any #labelNodes. @param {Point} newpos a new Point in document coordinates. @param {boolean=} useLocation true if you want to set the #location instead of the position. False by default. -
move(
Point newpos, [bool? useLocation]) → void -
Available on Part, provided by the Part$Typings extension
Move this part and any parts that are owned by this part to a new position. -
moveTo(
num newx, num newy, [bool? useLocation]) → void -
Available on Part, provided by the Part$Typings extension
Move this part and any parts that are owned by this part to a new position. This just calls #move without the caller having to allocate a new Point. @param {number} newx a new X value in document coordinates. @param {number} newy a new Y value in document coordinates. @param {boolean=} useLocation true if you want to set the #location instead of the position. False by default. @since 1.4 -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
rebuildItemElements(
) → void -
Available on Panel, provided by the Panel$Typings extension
Create and add new GraphObjects corresponding to and bound to the data in the #itemArray, after removing all existing elements from this Panel. This method is automatically called when replacing the #itemArray value, or when changing the value of #itemTemplate or #itemTemplateMap. -
remove(
GraphObject element) → void -
Available on Panel, provided by the Panel$Typings extension
Removes a GraphObject from this Panel's list of elements. @param {GraphObject} element A GraphObject. -
removeAdornment(
String category) → void -
Available on Part, provided by the Part$Typings extension
Remove any Adornment of the given category that may be associated with this Part. @param {string} category a string identifying the kind or role of the given adornment for this Part. -
removeAt(
num idx) → void -
Available on Panel, provided by the Panel$Typings extension
Removes an GraphObject from this Panel's list of elements at the specified index. @param {number} idx -
removeColumnDefinition(
num idx) → void -
Available on Panel, provided by the Panel$Typings extension
For Panel.Table|Table Panels: Removes the RowColumnDefinition for a particular row. -
removePoint(
num i) → void -
Available on Link, provided by the Link$Typings extension
Remove a particular point from the route; this may only be called within an override of #computePoints. @param {number} i int The zero-based index of the point to extract. @see #getPoint @see #setPoint @see #insertPoint @see #addPoint @see #clearPoints @since 1.6 -
removeRowDefinition(
num idx) → void -
Available on Panel, provided by the Panel$Typings extension
For Panel.Table|Table Panels: Removes the RowColumnDefinition for a particular row. -
rollbackRoute(
) → void -
Available on Link, provided by the Link$Typings extension
(undocumented) Call this method instead of #commitRoute if you need to cancel changes to the route. -
set(
dynamic config) → GraphObject -
Available on GraphObject, provided by the GraphObject$Typings extension
Set any number of properties on this GraphObject. This is common in initialization. This method can only be used to set existing properties on this object. To attach new properties, or to set properties of elements, use GraphObject#setProperties. -
setPoint(
num i, Point p) → void -
Available on Link, provided by the Link$Typings extension
Sets a particular point of the route; this may only be called within an override of #computePoints. @param {number} i int The zero-based index of the desired point. @param {Point} p The new point in document coordinates, which should not have infinite or NaN coordinate values, and which must not be modified afterwards. @see #getPoint @see #insertPoint @see #addPoint @see #removePoint @since 1.6 -
setPointAt(
num i, num x, num y) → void -
Available on Link, provided by the Link$Typings extension
(undocumented) Sets a particular point of the route; this may only be called within an override of #computePoints. @param {number} i int The zero-based index of the desired point. @param {number} x The new X, which should not be infinite or NaN, in document coordinates. @param {number} y The new Y, which should not be infinite or NaN, in document coordinates. -
setProperties(
Object props) → GraphObject -
Available on GraphObject, provided by the GraphObject$Typings extension
This method sets a collection of properties according to the property/value pairs on the given Object, in the same manner as GraphObject.make does when constructing a GraphObject with an argument that is a simple JavaScript Object. -
startRoute(
) → void -
Available on Link, provided by the Link$Typings extension
(undocumented) Allow calls to #setPoint, #addPoint, #insertPoint, #removePoint, and #clearPoints. You must call #commitRoute when you are done modifying the route. -
toString(
) → String -
A string representation of this object.
inherited
-
trigger(
AnimationTrigger trigger) → GraphObject -
Available on GraphObject, provided by the GraphObject$Typings extension
Adds an AnimationTrigger to this GraphObject. @since 2.2 @param {AnimationTrigger} trigger an AnimationTrigger @return {Panel} -
updateAdornments(
) → void -
Available on Part, provided by the Part$Typings extension
This is responsible for creating any selection Adornment (if this Part #isSelected) and any tool adornments for this part. @expose -
updateRelationshipsFromData(
) → void -
Available on Part, provided by the Part$Typings extension
Update all of the references to nodes in case they had been modified in the model without properly notifying the model by calling GraphLinksModel#setGroupKeyForNodeData or GraphLinksModel#setToKeyForLinkData or other similar methods. This method does not conduct a transaction, so you need to start and commit one yourself. -
updateRoute(
) → void -
Available on Link, provided by the Link$Typings extension
This method recomputes the route if the route is invalid, to make sure the #points are up-to-date. This method calls #computePoints in order to calculate a new route. -
updateTargetBindings(
[String? srcprop]) → void -
Available on Part, provided by the Part$Typings extension
Re-evaluate all data bindings in this Part, in order to assign new property values to the GraphObjects in this visual tree based on this this object's #data property values. This method does nothing if #data is null. -
updateTargetBindings(
[String? srcprop]) → void -
Available on Panel, provided by the Panel$Typings extension
Re-evaluate all data bindings on this panel, in order to assign new property values to the GraphObjects in this visual tree based on this object's #data property values.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- avoidsNodes ↔ EnumValue
-
Used as a value for Link#routing:
each segment is horizontal or vertical, but the route tries to avoid crossing over nodes.
getter/setter pair
- bezier ↔ EnumValue
-
Used as a value for Link#curve, to indicate that
the link path uses Bezier curve segments.
getter/setter pair
- end ↔ EnumValue
-
Used as a value for Link#adjusting,
to indicate that the link route computation should keep the
intermediate points of the previous route, just modifying the first and/or last points;
if the routing is orthogonal, it will only modify the first two and/or last two points.
getter/setter pair
- jumpGap ↔ EnumValue
-
Used as a value for Link#curve, to indicate that
orthogonal link segments will be discontinuous where they cross over
other orthogonal link segments that have a Link#curve of JumpOver or JumpGap.
getter/setter pair
- jumpOver ↔ EnumValue
-
Used as a value for Link#curve, to indicate that
orthogonal link segments will veer around where they cross over
other orthogonal link segments that have a Link#curve of JumpOver or JumpGap.
getter/setter pair
- none ↔ EnumValue
-
This is the default value for Link#curve and Link#adjusting,
to indicate that the path geometry consists of straight line segments and
to indicate that the link route computation does not depend on any previous route points;
this can also be used as a value for GraphObject#segmentOrientation
to indicate that the object is never rotated along the link route -- its angle is unchanged.
getter/setter pair
- normal ↔ EnumValue
-
Used as the default value for Link#routing:
the route goes fairly straight between ports.
getter/setter pair
- orientAlong ↔ EnumValue
-
This value for GraphObject#segmentOrientation results in
the GraphObject turned to have the same angle as the route:
the GraphObject's angle is always the same as the angle of the link's route
at the segment where the GraphObject is attached;
use this orientation for arrow heads.
getter/setter pair
- orientMinus90 ↔ EnumValue
-
This value for GraphObject#segmentOrientation results in
the GraphObject being turned counter-clockwise to be perpendicular to the route:
the GraphObject's angle is always 90 degrees less than the angle of the link's route
at the segment where the GraphObject is attached.
getter/setter pair
- orientMinus90Upright ↔ EnumValue
-
This value for GraphObject#segmentOrientation results in
the GraphObject turned counter-clockwise to be perpendicular to the route, just like Link.OrientMinus90, but is never upside down:
the GraphObject's angle always being 90 degrees less than the angle of the link's route
at the segment where the GraphObject is attached;
this is typically only used for TextBlocks or Panels that contain text.
getter/setter pair
- orientOpposite ↔ EnumValue
-
This value for GraphObject#segmentOrientation results in
the GraphObject's angle always being 180 degrees opposite from the angle of the link's route
at the segment where the GraphObject is attached.
getter/setter pair
- orientPlus90 ↔ EnumValue
-
This value for GraphObject#segmentOrientation results in
the GraphObject is turned clockwise to be perpendicular to the route:
the GraphObject's angle is always 90 degrees more than the angle of the link's route
at the segment where the GraphObject is attached.
getter/setter pair
- orientPlus90Upright ↔ EnumValue
-
This value for GraphObject#segmentOrientation results in
the GraphObject turned clockwise to be perpendicular to the route, just like Link.OrientPlus90, but is never upside down:
the GraphObject's angle always being 90 degrees more than the angle of the link's route
at the segment where the GraphObject is attached;
this is typically only used for TextBlocks or Panels that contain text.
getter/setter pair
- orientUpright ↔ EnumValue
-
This value for GraphObject#segmentOrientation results in
the GraphObject turned to have the same angle as the route, just like Link.OrientAlong, but is never upside down:
the GraphObject's angle always following the angle of the link's route
at the segment where the GraphObject is attached;
this is typically only used for TextBlocks or Panels that contain text.
getter/setter pair
- orientUpright45 ↔ EnumValue
-
This value for GraphObject#segmentOrientation results in
the GraphObject's angle always following the angle of the link's route
at the segment where the GraphObject is attached, but never upside down
and never angled more than +/- 45 degrees:
when the route's angle is within 45 degrees of vertical (90 or 270 degrees),
the GraphObject's angle is set to zero;
this is typically only used for TextBlocks or Panels that contain text.
getter/setter pair
- orthogonal ↔ EnumValue
-
Used as a value for Link#routing:
each segment is horizontal or vertical.
getter/setter pair
- scale ↔ EnumValue
-
Used as a value for Link#adjusting,
to indicate that the link route computation should scale and rotate the intermediate points
so that the link's shape looks approximately the same;
if the routing is orthogonal, this value is treated as if it were Link.End.
getter/setter pair
- stretch ↔ EnumValue
-
Used as a value for Link#adjusting,
to indicate that the link route computation should linearly interpolate the intermediate points
so that the link's shape looks stretched;
if the routing is orthogonal, this value is treated as if it were Link.End.
getter/setter pair