Class: Branch

Syntree.Branch

Represents the line connecting two nodes.

Constructor

new Branch()

Source:

Extends

Members

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:

Methods

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:

getId() → {number}

Accessor function for property id.
Overrides:
Source:
See:
  • Syntree.Element.id
Returns:
the id of the element
Type
number

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:

updateGraphics()

Update the elements graphical representation. Mostly serves as a wrapper for Syntree.Graphic.update. Extend in sub-classes with '__updateGraphics()'.
Overrides:
Source:
See: