Javascript: TextFrame.changeZOrder Method
Description
Changes the frame's z-order.
Syntax
<void> TextFrame.changeZOrder(<ZOrder> zOrder, [<RequestBooleanCallback> callback], [<ErrorCallback> errorCallback])Parameters
| Parameter | Description |
|---|---|
| zOrder | Specifies how the z-order is changed. |
| callback | Optional. Receives whether the z-order could be changed. |
| errorCallback | Optional. Is called when the operation failed with an error. |
Examples
The following example demonstrates TextFrame.changeZOrder in a practical document-editing workflow. It changes the frame's z-order.
function onTxError(error) {
console.error("TX Text Control error:", error.msg);
error.handled = true;
}
function changeZOrder(textFrame) {
textFrame.changeZOrder(
TXTextControl.ZOrder.Bottom,
function(result) {
if (result) {
console.log("change zorder is available.");
} else {
console.warn("change zorder is not available in the current document state.");
}
},
onTxError
);
}