LineLayout Class @beta
Represents the layout of a single line within a paragraph of a text block. Contains a sequence of RunLayout objects, the computed range of the line, and its offset from the document origin. Provides utilities for appending runs, computing ranges, and converting to result objects.
Methods
Name | Description | |
---|---|---|
constructor(source: Run | List | Paragraph, style: TextStyleSettingsProps, context?: LayoutContext, depth: number0): LineLayout | ||
append(run: RunLayout): void | ||
stringify(): string | Compute a string representation, primarily for debugging purposes. | |
toResult(): LineLayoutResult |
Properties
Name | Type | Description | |
---|---|---|---|
back Accessor ReadOnly | RunLayout | Gets the last RunLayout in this line. | |
depth | number | ||
isEmpty Accessor ReadOnly | boolean | Indicates whether this line contains any runs. | |
justificationRange | Range2d | ||
lengthFromLastTab | number | ||
marker Accessor | undefined | RunLayout | Gets or sets the marker RunLayout for this line, used for lists. | |
marker Setter | marker(value: RunLayout): void | ||
offsetFromDocument | WritableXAndY | ||
range | Range2d | ||
runRange | Range2d | ||
runs Accessor ReadOnly | ReadonlyArray<RunLayout> | Gets the array of RunLayout objects contained in this line. | |
source | Run | List | Paragraph |
Defined in
Last Updated: 07 October, 2025
Found something wrong, missing, or unclear on this page? Raise an issue in our repo.