Javascript: TextFrame.getMoveable Method
Description
Gets whether a frame can be moved in the document at run time with the built-in mouse interface.
Syntax
<void> TextFrame.getMoveable(<RequestBooleanCallback> callback, [<ErrorCallback> errorCallback])Parameters
| Parameter | Description |
|---|---|
| callback | Receives the current property value. |
| errorCallback | Optional. Is called when the operation failed with an error. |
Examples
The following example demonstrates TextFrame.getMoveable in a practical document-editing workflow. It gets whether a frame can be moved in the document at run time with the built-in mouse interface.
function onTxError(error) {
console.error("TX Text Control error:", error.msg);
error.handled = true;
}
function inspectMoveable(textFrame) {
textFrame.getMoveable(
function(result) {
if (result) {
console.log("get moveable is available.");
} else {
console.warn("get moveable is not available in the current document state.");
}
},
onTxError
);
}