EditorUi.zoom Property
Gets or sets the worksheet display zoom, in percent, from 25 through 400.
Owner: EditorUi. Package: @txtextcontrol/tx-sheet-control. Version: 2.0.0.
Syntax
zoom: number
Read the current percentage through editor.ui.zoom, or assign a finite percentage to change the editor view. Assignments round to a whole percentage and clamp to the 25–400 range.
Examples
Pass the EditorUi value obtained from its owning control, collection, callback or operation. The function reads that value without constructing a replacement document object.
import type { EditorUi } from '@txtextcontrol/tx-sheet-control';
function inspectEditorUiZoom(editorUi: EditorUi) {
const value = editorUi['zoom'];
console.log('EditorUi.zoom', value);
}
Remarks
A nonfinite assignment raises TypeError. Assigning a finite value below 25 applies 25 percent; a value above 400 applies 400 percent. This property changes screen zoom independently of print scaling.
Use setZoom when you need the applied percentage as the return value.