weasel API - v0.8.0
    Preparing search index...

    Interface TextLineBoxesOpts

    Options for textLineBoxes.

    interface TextLineBoxesOpts {
        includeEmpty?: boolean;
        maxWidth?: number;
        padding?: number;
    }
    Index

    Properties

    includeEmpty?: boolean

    Keep boxes for blank lines (zero width). Default false — a blank line covers no area, so for hit-testing and silhouettes it is noise. Pass true when the indices have to line up with the wrapped lines.

    maxWidth?: number

    Wrap width. Default pose.width, which is what createTextLayer passes and what TextPose means by its box.

    Pass Infinity for a node painted by the built-in kit:text painter: that painter deliberately does not forward maxWidth (see NodeShape.ts), so its text does not wrap, and boxes computed with a finite width would wrap where the paint did not.

    padding?: number

    Grow every box by this much on all four sides (world units). Default 0. Picking wants a little slack so a single hairline row of text is still grabbable; clipping and export want none.