Options
All
  • Public
  • Public/Protected
  • All
Menu

A group of LogootNodeGroups that are considered by the JoinFunction (see the list document model index.ts file) to be related. Each Logoot node is not displayed in the order specified in groups. Rather, all of the nodes on a particular branch are displayed together and in the order defined by branch_order.

todo

Move branch_order into the ListDocumentModel. No reason not to have a whole-document branch order.

Hierarchy

Index

Constructors

constructor

Properties

branch_order

branch_order: BranchKey[] = []

The order in which branches are displayed. All of the nodes that make up a single branch are placed together.

groups

groups: LogootNodeGroup[] = []

A list of LogootNodeGroups that make up the Logoot side of the local document. A group's nodes will be split up and placed into one of the branch sections as defined in branch_order. These absolutely must be in order based on their Logoot positions.

Optional left_node

left_node: ConflictGroup

Optional parent_node

parent_node: ConflictGroup

Optional right_node

right_node: ConflictGroup

value

value: number

Accessors

absolute_value

  • get absolute_value(): number

conflicted

  • get conflicted(): boolean

first_branch

inorder_successor

known_position

  • get known_position(): number

largest_child

largest_larger_child

last_branch

ldoc_end

  • get ldoc_end(): number

ldoc_length

  • get ldoc_length(): number

logoot_end

logoot_start

smallest_child

smallest_smaller_child

Methods

addChild

addSpaceBefore

  • addSpaceBefore(s: number): void

branchLength

  • branchLength(branches: BranchKey[]): number
  • The length in the local document (only DATA nodes) of only branches.

    Parameters

    • branches: BranchKey[]

      A list of branches to count.

    Returns number

getNeighbors

  • getNeighbors(__namedParameters: object): object
  • Get the nodes to the left and right of start. If there is already a LogootNodeGroup with the same position, behavior is undefined.

    Parameters

    • __namedParameters: object

    Returns object

    An object containing left and right LogootNodeGroups, as well as a pos number, which is the position of right in this.groups.

insertPos

  • Find the position in the local document of a group that is already in this ConflictGroup. This is named insertPos because it is used to find the insertion position of a new group, but the naming is a bit confusing.

    throws

    {FatalError} Will throw if after is not in this CG.

    Parameters

    • br: BranchKey

      The branch on which to determine the position.

    • at: LogootNodeGroup

      The LogootNodeGroup to determine the position of.

    Returns number

    The position of at.

insertSingleBranchGroup

  • Adds a group with only one branch to this CG and returns its position.

    throws

    {TypeError} If the group has more than one branch or if the group's ConflictGroup is not set to this. Set group.group to this before calling to avoid this error.

    Parameters

    Returns number

    The position in the local document of the insertion.

operateOnAll

  • operateOnAll(cb: function): void

preferential_cmp

removeChild

replaceWith

search

toString

  • toString(): string

Generated using TypeDoc