Expand all

ve.dm.NodeAnnotationRange

Constructor

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

NodeAnnotationRange - a node range with an annotation

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 - a node range with an annotation

The range is relative to the node offset.

Methods

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

Returns:

The annotation

Type
ve.dm.Annotation
Source: