Options
All
  • Public
  • Public/Protected
  • All
Menu

The cursor manager maintains a prioritized list of cursors for the viewer.

Cursors with the highest priority will be considered active, where the most recently added cursor will take precedence if there are multiple cursors with the same priority.

Hierarchy

  • CursorManager

Index

Constructors

Properties

onChanged: EventDispatcher<void> = ...

An event dispatcher that emits an event when a cursor is added or removed.

see

CursorManager.add to add a cursor.

see

CursorManager.getActiveCursor to query the current cursor.

HIGH_PRIORITY: 20 = 20

A constant representing the high priority cursors.

LOW_PRIORITY: 0 = 0

A constant representing the lowest priority cursors.

NORMAL_PRIORITY: 10 = 10

A constant representing a priority between LOW_PRIORITY and HIGH_PRIORITY.

Methods

  • add(cursor: Cursor, priority?: number): Disposable
  • Adds a cursor to the cursor manager, and returns an identifier that can be used to remove the cursor.

    see

    CursorManager.getActiveCursor to query the current cursor.

    Parameters

    • cursor: Cursor

      The cursor to add.

    • priority: number = CursorManager.NORMAL_PRIORITY

      The priority of the cursor. Higher values have higher priority over lower values.

    Returns Disposable

    An identifier for the cursor.

  • getActiveCursor(): undefined | Cursor