Show:

Tree.Node extension that adds methods useful for nodes in trees that use the Tree.Openable extension.

Constructor

Tree.Node.Openable

()

Index

Methods

close

(
  • [options]
)
chainable

Closes this node if it's currently open.

Parameters:

  • [options] Object optional

    Options.

    • [silent=false] Boolean optional

      If true, the close event will be suppressed.

    • [src] String optional

      Source of the change, to be passed along to the event facade of the resulting event. This can be used to distinguish between changes triggered by a user and changes triggered programmatically, for example.

isOpen

() Boolean

Returns true if this node is currently open.

Note: the root node of a tree is always considered to be open.

Returns:

Boolean:

true if this node is currently open, false otherwise.

open

(
  • [options]
)
chainable

Opens this node if it's currently closed.

Parameters:

  • [options] Object optional

    Options.

    • [silent=false] Boolean optional

      If true, the open event will be suppressed.

    • [src] String optional

      Source of the change, to be passed along to the event facade of the resulting event. This can be used to distinguish between changes triggered by a user and changes triggered programmatically, for example.

toggleOpen

(
  • [options]
)
chainable

Toggles the open/closed state of this node, closing it if it's currently open or opening it if it's currently closed.

Parameters:

  • [options] Object optional

    Options.

    • [silent=false] Boolean optional

      If true, events will be suppressed.

    • [src] String optional

      Source of the change, to be passed along to the event facade of the resulting event. This can be used to distinguish between changes triggered by a user and changes triggered programmatically, for example.