Expand all

ve.dm.LinearSelection

Extends

Constructor

new ve.dm.LinearSelection(range) #

Parameters:

Name Type Description
range ve.Range
Source:

Properties

collapseToEnd #

Get a new selection at the end point of this one

Overrides:
Source:
Get a new selection at the end point of this one

collapseToFrom #

Get a new selection at the 'from' point of this one

Overrides:
Source:
Get a new selection at the 'from' point of this one

collapseToStart #

Get a new selection at the start point of this one

Overrides:
Source:
Get a new selection at the start point of this one

collapseToTo #

Get a new selection at the 'to' point of this one

Overrides:
Source:
Get a new selection at the 'to' point of this one

equals #

Check if two selections are equal

Overrides:
Source:
Check if two selections are equal

getCoveringRange #

Get the covering linear range for this selection

Overrides:
Source:
Get the covering linear range for this selection

getDescription #

Get a textual description of this selection, for debugging purposes

Overrides:
Source:
Get a textual description of this selection, for debugging purposes

getRanges #

Get the content ranges for this selection

Overrides:
Source:
Get the content ranges for this selection

isCollapsed #

Check if a selection is collapsed

Overrides:
Source:
Check if a selection is collapsed

toJSON #

Get a JSON serialization of this selection

Overrides:
Source:
Get a JSON serialization of this selection

translateByTransaction #

Apply translations from a transaction

Overrides:
Source:
Apply translations from a transaction

translateByTransactionWithAuthor #

Apply translations from a transaction, with bias depending on author ID comparison

Overrides:
Source:
Apply translations from a transaction, with bias depending on author ID comparison

Methods

getName() → {string} #

Get the name of the selection type

Inherited from:
Source:

Returns:

Selection type name

Type
string
Get the name of the selection type

getRange() → {ve.Range} #

Get the range for this selection

Source:

Returns:

Type
ve.Range
Get the range for this selection

isNull() → {boolean} #

Check if this selection is null

Inherited from:
Source:

Returns:

The selection is null

Type
boolean
Check if this selection is null

translateByChange(change, authorId) → {ve.dm.Selection} #

Apply translations from a change

Parameters:

Name Type Description
change ve.dm.Change
authorId number

The author ID of this selection

Inherited from:
Source:

Returns:

A new translated selection

Type
ve.dm.Selection
Apply translations from a change

translateByTransactions(txs, [excludeInsertion]) → {ve.dm.Selection} #

Apply translations from a set of transactions

Parameters:

Name Type Attributes Description
txs Array.<ve.dm.Transaction>

Transactions

excludeInsertion boolean optional

Do not grow to cover insertions at boundaries

Inherited from:
Source:

Returns:

A new translated selection

Type
ve.dm.Selection
Apply translations from a set of transactions