Class: TreeChangedEvent

ft/core/treechangedevent. TreeChangedEvent

Reports changes in a Tree.

The individual regions of change are stored in Delta's. This example shows how to use the com.foldingtext.editor.treeChange extension point to listen for TreeChangedEvents.

Extensions.addTreeChanged(function (editor, e) {
    e.deltas.forEach(function (eachDelta) {
        // process each delta
    })
});

Members

Methods




Member Details

tree :module:ft/core/tree.Tree

The tree where the changes took place.

Type:

deltas :module:ft/core/delta.Delta

The change deltas in the order in which they happened.

Type:

Method Details

previousParent(node) → {module:ft/core/node.Node}

Return this node's parent before the reported changes took place.

Parameters:
Name Type Description
node module:ft/core/node.Node
Returns:
Type
module:ft/core/node.Node