marker.js 3 Documentation
    Preparing search index...

    Class TextBlock

    TextBlock represents a block of text used across all text-based markers.

    Index

    Accessors

    • get textSize(): undefined | DOMRect

      Returns the size of the rectangle containing the text block's text.

      Returns undefined | DOMRect

    Constructors

    Events

    onTextSizeChanged?: (textBlock: TextBlock) => void

    Fired when text size changes.

    Methods

    • Returns true if the text block contains the supplied element.

      Parameters

      • el: EventTarget

        element to test.

      Returns boolean

      true if the element belongs to the text block, false otherwise.

    Properties

    offsetX: number = 0

    Text block's horizontal offset from the automatically calculated position.

    offsetY: number = 0

    Text block's vertical offset from the automatically calculated position.

    wordWrap: boolean = false