Javascript: TXTextControl.zoom Method
Description
Zooms the contents of the TextControl.
Syntax
<void> TXTextControl.zoom(<number> zoomFactor, [<EmptyRequestCallback> callback], [<ErrorCallback> errorCallback])Parameters
| Parameter | Description |
|---|---|
| zoomFactor | Specifies the zoom factor, in percent. This can also be one of the values of the TXTextControl.SpecialZoomFactor enumeration. |
| callback | Optional. Is called when the operation completed. |
| errorCallback | Optional. Is called when the operation failed with an error. |
Examples
The following example demonstrates TXTextControl.zoom in a practical document-editing workflow. Zooms the contents of the TextControl.
function onTxError(error) {
console.error("TX Text Control error:", error.msg);
error.handled = true;
}
TXTextControl.zoom(
100,
function() {
console.log("zoom completed.");
},
onTxError
);