Constructor
new ve.ce.Selection(model, surface)abstract
#
Parameters:
Name | Type | Description |
---|---|---|
model |
ve.dm.Selection | Selection model |
surface |
ve.ce.Surface | Surface view |
- Source:
Properties
getDirectionalityabstract
#
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.
- Source:
Get the block directionality of the selection
Note: This is not the direction of the selection (e.g.
getSelectionBoundingRectabstract
#
Get the coordinates of the selection's bounding rectangle relative to the surface.
- Source:
getSelectionRectsabstract
#
Get the rectangles of the selection relative to the surface.
- Source:
isFocusedNodeabstract
#
Check if the selection covers a focused node
- Source:
isNativeCursorabstract
#
Check if the selection is a native cursor selection
- Source:
Methods
equals(other) → {boolean}
#
Check if two selections are equal
Parameters:
Name | Type | Description |
---|---|---|
other |
ve.ce.Selection | Other selection |
- Source:
Returns:
Selections are equal
- Type
- boolean
getModel() → {ve.dm.Selection}
#
getSelectionFocusRect() → {Object|null
}
#
null
}
#
Get the rectangle for the selection's focus end
The default gives the bounding rectangle after using collapseToTo.
- 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
}abstract
#
null
}abstract
#
Get the start and end rectangles of the selection relative to the surface.
- Source:
Returns:
Start and end selection rectangles
getSurface() → {ve.ce.Surface}
#
newFromModel(model, surface) → {ve.ce.Selection}static
#
Create a new selection view from a selection model
Parameters:
Name | Type | Description |
---|---|---|
model |
ve.dm.Selection | Selection model |
surface |
ve.ce.Surface | Surface view |
- Source:
Returns:
Selection view
- Type
- ve.ce.Selection