TreeControllerNode source

Specializes Montage

A tree controller is a view-model that tracks whether each node in a corresponding data-model is expanded or collapsed. It also produces a linearization of the visible iterations, transforming hierachical nesting into a flat, incrementally-updated array of iterations with the corresponding indentation depth. Bind a root node from the data model to a tree controller and bind the tree controller's iterations to a content controller for a repetition.

Properties

children source

The child nodes is an array of the corresponding tree controller view-model node for each of the children. The child nodes array is maintained by handleChildrenEntriesRangeChange.

constructor source

content source

The data model corresponding to this node.

depth source

The number of times this node should be indented to reach its visually representative depth. This property or junctions are alternately useful for tree visualization strategies.

expanded source

The only meaningful user-defined state for this tree view, whether the node is expanded (or collapsed).

index source

The position of this node within the parent node, as maintained by bindings.

isFinal source

Whether this node appears in the last position of the parent node's children, as maintained by bindings.

iterations source

The iterations array contains this node and all of its children beneath expanded nodes. It is maintained entirely by a binding that involves this node, its child nodes, the iterations of its child nodes, and whether this node is expanded.

junctions source

An array of hints for what kind of line art needs to be employed for each level of indentation leading up to this node's content. The hints include "final", "medial", "before", and "after". The "final" hint implies a junction that leads from above to the content to the right. The "medial" hint implies a junction that follows from above and continues down, with a line to content to the right. The "before" hint implies a junction that passed from above to below. The "after" hint implies a junction with no lines at all. The junctions array reacts synchronous to content changes.

parent source

The node that is this node's parent, or null if this is the root node.

Methods

callDelegateMethod(name) source

This method calls the method named with the identifier prefix if it exists. Example: If the name parameter is "shouldDoSomething" and the caller's identifier is "bob", then this method will try and call "bobShouldDoSomething"

Parameters:
Name Type Description
name string
Inherited From:

equals(anObject) → {boolean} source

Returns true if two objects are equal, otherwise returns false.

Parameters:
Name Type Description
anObject Object

The object to compare for equality.

Inherited From:
Returns: boolean

Returns true if the calling object and anObject are identical and their uuid properties are also equal. Otherwise, returns false.

Generated from a4679af

comments powered by Disqus

More help?

Can't find what you are looking for? Get in touch, we're more than happy in helping answer your questions.