Index Tree Node
IndexTreeNode is the node of IndexTree. It is used to represent the document of text-based editors.
Properties
Functions
Clones the element node with the given issueTimeTicket lambda and value.
Detaches the given alive child from this node for moving between parents (i.e. merge). Updates both visibleSize and totalSize.
Returns the offset of the given node in the children. If includeRemoved is true, it includes removed nodes in the calculation.
getChildrenText returns text value of all text type children.
Inserts the newNode after the targetNode.
Inserts the newNode before the targetNode.
Returns true when child is an element split sibling that the §7.3 boundary-insert migration must skip (not migrate) but keep scanning past. Subclasses override; the default returns false.
Returns true when child was created by an operation the editor did not yet know about (per versionVector). Subclasses override; default false.
Returns the length of the node including padding. If includeRemoved is true, it includes removed nodes in the calculation.
Removes the given child (physically purges it from the tree).
Returns true when child should be kept in the original (left) node rather than moved to the split sibling. Subclasses override this to implement merge-aware split semantics. The default always returns false.
Updates the size of the ancestors. It is used when the size of the node is changed. If includeRemoved is true, it updates ancestors totalSize including removed nodes.
Updates the size of the descendants. It is used when the tree is newly created and the size of the descendants is not calculated. If includeRemoved is true, it includes removed nodes in the calculation.