Compartilhar via


LiveCursor class

Represents a live (shared) cursor. Applications that want to customize the appearance of cursors on the screen should extend LiveCursor and override its renderedElement property to return a custom HTML element.

Constructors

LiveCursor(string, IUserInfo)

Initializes a new instance of LiveCursor.

Properties

clientId
idleTime

Gets the amount of time the cursor has been idle.

renderedElement

Returns an HTML element representing the cursor. Applications that extend LiveCursor must override get renderedElement to return a custom built HTML element.

userInfo

Methods

setPosition(IPoint)

Updates the position of the cursor.

Constructor Details

LiveCursor(string, IUserInfo)

Initializes a new instance of LiveCursor.

new LiveCursor(clientId: string, _userInfo?: IUserInfo)

Parameters

clientId

string

_userInfo
IUserInfo

Property Details

clientId

clientId: string

Property Value

string

idleTime

Gets the amount of time the cursor has been idle.

number idleTime

Property Value

number

renderedElement

Returns an HTML element representing the cursor. Applications that extend LiveCursor must override get renderedElement to return a custom built HTML element.

HTMLElement renderedElement

Property Value

HTMLElement

userInfo

undefined | IUserInfo userInfo

Property Value

undefined | IUserInfo

Method Details

setPosition(IPoint)

Updates the position of the cursor.

function setPosition(position: IPoint)

Parameters

position
IPoint

The new position of the cursor.