Extends
Members
(static) fromNode :Syntree.Node
Node the arrow starts at.
Type:
- Source:
(static) path :string
Path string of the arrow line.
Type:
- string
- Source:
(static) toNode :Syntree.Node
Node the arrow ends at.
Type:
- Source:
deleted :boolean
Whether or not this element has been deleted.
Needed to avoid double deletion.
Type:
- boolean
- Overrides:
- Source:
id :number
A session-unique id.
Type:
- number
- Overrides:
- Source:
selectable
Whether or not this element is selectable.
Selectable elements are Syntree.Node, Syntree.Branch, Syntree.Arrow.
- Overrides:
- Source:
- See:
selected :boolean
Whether or not this element is selected.
Type:
- boolean
- Inherited From:
- Source:
- See:
-
- Syntree.SelectableElement#isSelected
- Syntree.SelectableElement#select
Methods
__delete()
Custom addition to Syntree.Element#delete.
- Source:
- See:
__updateGraphics()
Custom addition to Syntree.Element#updateGraphics.
- Source:
- See:
delete()
Delete the element.
Removes graphical elements, deregisters from Syntree.Workspace.page, and sets deleted property to true.
Extend in sub-classes with '__delete()'.
- Overrides:
- Source:
- See:
deselect()
Deselect the element.
Controls the appearance and behavior of this element only.
Other overarching management is handled by Syntree.Page.
- Inherited From:
- Source:
- See:
-
- Syntree.SelectableElement#isSelected
- Syntree.SelectableElement#selected
- Syntree.Page
getEndCtrlPoint() → {object}
Get control point for end of path.
- Source:
- See:
-
- Syntree.Arrow#path
Returns:
- x and y coordinates
- Type
- object
getEndPoint() → {object}
Get end point of path.
- Source:
- See:
-
- Syntree.Arrow#path
Returns:
- x and y coordinates
- Type
- object
getId() → {number}
Accessor function for property id.
- Overrides:
- Source:
- See:
-
- Syntree.Element.id
Returns:
the id of the element
- Type
- number
getStartCtrlPoint() → {object}
Get control point for start of path.
- Source:
- See:
-
- Syntree.Arrow#path
Returns:
- x and y coordinates
- Type
- object
getStartPoint() → {object}
Get start point of path.
- Source:
- See:
-
- Syntree.Arrow#path
Returns:
- x and y coordinates
- Type
- object
isDeletable() → {boolean}
Whether or not this element is deletable.
Deletable elements are Syntree.Node, Syntree.Branch, Syntree.Arrow.
Syntree.Branch should never be deletable directly by the user.
Branches should only be deleted automatically when their child node is deleted.
- Overrides:
- Source:
- See:
-
- Syntree.Node.__delete
Returns:
- Type
- boolean
isDeleted() → {boolean}
Accessor function for property deleted.
- Overrides:
- Source:
- See:
-
- Syntree.Element.deleted;
Returns:
whether or not the element is deleted
- Type
- boolean
isElement() → {boolean}
Whether or not this object is an element.
Elements are Syntree.Node, Syntree.Branch, Syntree.Arrow.
- Overrides:
- Source:
Returns:
- Type
- boolean
isSelectable() → {boolean}
Accessor function for property selectable.
- Overrides:
- Source:
- See:
Returns:
whether or not the element is selectable
- Type
- boolean
select()
Select the element.
Controls the appearance and behavior of this element only.
Deselecting previously selected element and other overarching management is handled by Syntree.Page.
- Inherited From:
- Source:
- See:
-
- Syntree.SelectableElement#isSelected
- Syntree.SelectableElement#selected
- Syntree.Page
setEndCtrlPoint(x, y)
Set control point for end of path.
Parameters:
Name | Type | Description |
---|---|---|
x |
number | x coordinate |
y |
number | y coordinate |
- Source:
- See:
-
- Syntree.Arrow#path
setEndPoint(x, y)
Set end point of path.
Parameters:
Name | Type | Description |
---|---|---|
x |
number | x coordinate |
y |
number | y coordinate |
- Source:
- See:
-
- Syntree.Arrow#path
setStartCtrlPoint(x, y)
Set control point for start of path.
Parameters:
Name | Type | Description |
---|---|---|
x |
number | x coordinate |
y |
number | y coordinate |
- Source:
- See:
-
- Syntree.Arrow#path
setStartPoint(x, y)
Set start point of path.
Parameters:
Name | Type | Description |
---|---|---|
x |
number | x coordinate |
y |
number | y coordinate |
- Source:
- See:
-
- Syntree.Arrow#path
updateGraphics()
Update the elements graphical representation.
Mostly serves as a wrapper for Syntree.Graphic.update.
Extend in sub-classes with '__updateGraphics()'.
- Overrides:
- Source:
- See: