Skip to main content

Editor.Components.VerticalOverflow

Enum

Settings used with Editor.Components.Text.

Index

Enumeration Members

Example

const model = this.pluginSystem.findInterface(Editor.Model.IModel) as Editor.Model.IModel;
const scene = model.project.scene;
const so = scene.addSceneObject(scene.rootSceneObjects[0]);
so.name = 'VerticalOverflowDemo';
const text = so.addComponent('Text') as unknown as Editor.Components.Text;

// VerticalOverflow controls how text behaves when it exceeds vertical bounds
text.verticalOverflow = Editor.Components.VerticalOverflow.Truncate;
console.log('verticalOverflow set to Truncate:', text.verticalOverflow === Editor.Components.VerticalOverflow.Truncate);

text.verticalOverflow = Editor.Components.VerticalOverflow.Shrink;
console.log('verticalOverflow set to Shrink:', text.verticalOverflow === Editor.Components.VerticalOverflow.Shrink);

Enumeration Members

Overflow

Overflow: number

Allow text to extend beyond vertical bounds.


Shrink

Shrink: number

Reduce text size to fit within vertical bounds.


Truncate

Truncate: number

Clip text that exceeds vertical bounds.

See also

LensScripting.Text.