Options
All
  • Public
  • Public/Protected
  • All
Menu

Contains the rectangle and ContentLocation of a line or replaced element.

Hierarchy

  • IVisibleContentRect

Index

Properties

clientRect

clientRect: DOMRect

The rectangle representing a line box or replaced element. Coordinates are in application viewport coordinate space.

Any transform applied to the ReaderView, such as the user pinch-zooming, will make this rectangle out of date.

Note that the height of this clientRect is not necessarily the same as the lineHeight. The height calculation is publication format specific, for example in EPUB, the height of the box is determined by the font ascent and descent.

contentLocation

contentLocation: IContentLocation

The content location that most closely matches the rectangle.

nodeData

A JSON compatible data structure representing the underlying node from where the rectangle was generated, like for example an HTML Element in an HTML content-document.

You must pass IVisibleContentRectsOptions.includeNodeData = true to ReaderView.fetchRectsForVisibleContent for this field to be set.

type

Describes if this object represents a LINE_BOX or an ELEMENT. Use nodeData to get more information about the type of Element.

Methods

toJSON

Generated using TypeDoc