Expand all

ve.dm.NodeRange

Constructor

new ve.dm.NodeRange(node, relativeRange) #

NodeRange - a range inside some ve.dm.ContentBranchNode

The range is relative to the node offset. It is not live, i.e. not automatically updated when the document changes (unlike a ve.dm.SurfaceFragment), but its validity will be preserved under changes unless they modify the ContentBranchNode itself. This is useful for caching in ve.dm.Document#cachedData.

Parameters:

Name Type Description
node ve.dm.ContentBranchNode

The node with respect to which ranges are relative

relativeRange ve.Range

The range, given relative to node.getOffset()

Source:

NodeRange - a range inside some ve.dm.ContentBranchNode

The range is relative to the node offset.

Methods

getAbsoluteRange() → {ve.Range} #

Returns:

The absolute range (i.e. the range relative to the document node)

Type
ve.Range
Source: