Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface ICursorList

Interface for a list that supports Cursors.

All of Collabs' built-in list and text types implement this interface.

Hierarchy

Implemented by

Index

Methods

  • getPosition(index: number): string
  • Returns the position currently at index.

    Parameters

    • index: number

    Returns string

  • indexOfPosition(position: string, searchDir?: "none" | "left" | "right"): number
  • Returns the current index of position.

    If position is not currently present in the list, then the result depends on searchDir:

    • "none" (default): Returns -1.
    • "left": Returns the next index to the left of position. If there are no values to the left of position, returns -1.
    • "right": Returns the next index to the right of position. If there are no values to the right of position, returns the length of the list.

    To find the index where a position would be if present, use searchDir = "right".

    Parameters

    • position: string
    • Optional searchDir: "none" | "left" | "right"

    Returns number

Generated using TypeDoc