Expand all

ve.dm.NodeAnnotationRange

Constructor

new ve.dm.NodeAnnotationRange(node, annotation, relativeRange) #

NodeAnnotationRange - an annotation with 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

annotation ve.dm.Annotation
relativeRange ve.Range

The range, given relative to node.getOffset()

Source:

NodeAnnotationRange - an annotation with 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 relative to the document node)

Type
ve.Range
Source:

getAnnotation() → {ve.dm.Annotation} #

Returns:

The annotation

Type
ve.dm.Annotation
Source: