OperationsManager
How to get OperationsManager
ES2015+:
import OperationsManager from 'fontoxml-operations/operationsManager'
ES5:
define([
'fontoxml-operations/operationsManager'
], function (
OperationsManager
) {
});
Type: Class
Operations control all interaction with the document and most state of the application. The operationManager manages the operations pipeline. It may execute operations and retrieve the state of an operation.
For more information on how to create operations, refer to the operations
Methods
Name | Description |
---|---|
executeOperation | Execute the Operation with the specified operationName, optionally passing the specified initialData as its step data. Returns a promise that resolves to the resulting step data when the operation completes. Code calling this method should always handle rejection, to prevent console errors about unhandled rejections. |
getOperationState | Compute the state of the operation with the specified operationName, optionally passing the specified initialData as its step data. If resultAsStepData is true, this function returns the resulting step data with the operation state object under the operationState property. Otherwise, directly returns the resulting state object. |
invalidateOperationStateByOperationName | Cause the state of the given operation to be re-evaluated. This will also re-evaluate the state of any operation that uses this operation. |
invalidateOperationStatesByStepType | Cause the state of any operation using the given step type to be re-evaluated. This includes any operation using the step type indirectly through another operation. |