Expand all

ve.ce.NullSelection

Extends

Constructor

new ve.ce.NullSelection(surface, model) #

Parameters:

Name Type Description
surface ve.ce.Surface
model ve.dm.Selection
Source:

Properties

getDirectionality #

Get the block directionality of the selection

Note: This is not the direction of the selection (e.g. ve.Range#isBackwards); it is the computed block-level CSS directionality. The actual directionality at any point within the selection depends on both this and the browser's implementation of BIDI algorithm.

Overrides:
Source:

Get the block directionality of the selection

Note: This is not the direction of the selection (e.g.

getSelectionBoundingRect #

Get the coordinates of the selection's bounding rectangle relative to the surface.

Overrides:
Source:
Get the coordinates of the selection's bounding rectangle relative to the surface.

getSelectionRects #

Get the rectangles of the selection relative to the surface.

Overrides:
Source:
Get the rectangles of the selection relative to the surface.

isFocusedNode #

Check if the selection covers a focused node

Overrides:
Source:
Check if the selection covers a focused node

isNativeCursor #

Check if the selection is a native cursor selection

Overrides:
Source:
Check if the selection is a native cursor selection

Methods

equals(other) → {boolean} #

Check if two selections are equal

Parameters:

Name Type Description
other ve.ce.Selection

Other selection

Inherited from:
Source:

Returns:

Selections are equal

Type
boolean
Check if two selections are equal

getModel() → {ve.dm.Selection} #

Get the selection model

Inherited from:
Source:

Returns:

Selection model

Type
ve.dm.Selection
Get the selection model

getSelectionFocusRect() → {Object|null} #

Get the rectangle for the selection's focus end

The default gives the bounding rectangle after using collapseToTo.

Inherited from:
Source:

Returns:

Selection rectangle

Type
Object | null

Get the rectangle for the selection's focus end

The default gives the bounding rectangle after using collapseToTo.

getSelectionStartAndEndRects() → {Object.<string, Object>|null} #

Get the start and end rectangles of the selection relative to the surface.

Overrides:
Source:

Returns:

Start and end selection rectangles

Type
Object.<string, Object> | null
Get the start and end rectangles of the selection relative to the surface.

getSurface() → {ve.ce.Surface} #

Get the surface view this selection exists on

Inherited from:
Source:

Returns:

Surface view

Type
ve.ce.Surface
Get the surface view this selection exists on