Options
All
  • Public
  • Public/Protected
  • All
Menu

A ReaderViewAnnotation can either reference a range of publication content or a position (point) within publication content. ReaderViewAnnotations are rendered inside a ReaderViewAnnotationLayer, which in turn is rendered on top of publication content.

When an annotation is rendered, a container element is created. The container element dimensions and position is calculated from the bounding box encapsulating all referenced content.

Both range and position annotations, as well as their container can be styled separately using CSS. You can also attach custom data to each ReaderViewAnnotation instance.

Type parameters

  • T = any

Hierarchy

  • IReaderViewAnnotation

Index

Methods

getAnnotationLayer

getCustomData

  • getCustomData(): T
  • Get the custom data set for this annotation.

    Returns T

getLocator

  • Get the locator to this instance.

    Returns ILocator

hasCustomizedStyleOptions

  • hasCustomizedStyleOptions(): boolean
  • If setOptions() has been called on this instance to override options.

    Returns boolean

isDestroyed

  • isDestroyed(): boolean
  • If this instance has been destroyed.

    Returns boolean

isIntersectingVisibleRange

  • isIntersectingVisibleRange(): boolean
  • If this instance is currently intersecting the visible range of the ReaderView.

    Returns boolean

setCustomData

  • setCustomData(data: T): void
  • Sets the custom data for this annotation.

    Parameters

    • data: T

    Returns void

setOptions

  • Set the options for this annotation. When passing an options object, all the default options from the ReaderViewAnnotationLayer are ignored. In other words, there is no inheritance from the default options.

    When passing null, all the default options will be used.

    Parameters

    Returns void

Generated using TypeDoc