NoOperation
Operation which is doing nothing ("empty operation", "do-nothing operation", "noop"). This is an operation, which when executed does not change the tree model. It still has some parameters defined for transformation purposes.
In most cases this operation is a result of transforming operations. When transformation returns NoOperation it means that changes done by the transformed operation have already been applied.
Properties
affectedSelectable : ModelSelectablereadonlymodule:engine/model/operation/nooperation~NoOperation#affectedSelectableA selectable that will be affected by the operation after it is executed.
The exact returned parameter differs between operation types.
baseVersion : null | numberinheritedmodule:engine/model/operation/nooperation~NoOperation#baseVersionversionon which operation can be applied. If you try to apply operation with different base version than the document version the model-document-applyOperation-wrong-version error is thrown.module:engine/model/operation/nooperation~NoOperation#batchBatch to which the operation is added or
nullif the operation is not added to any batch yet.Note, that a non-document operation has this property always set to
null, and is never added to any batch.isDocumentOperation : booleanreadonlyinheritedmodule:engine/model/operation/nooperation~NoOperation#isDocumentOperationDefines whether operation is executed on attached or detached items.
type : 'noop'readonlymodule:engine/model/operation/nooperation~NoOperation#typeOperation type.
Static properties
className : stringreadonlystaticmodule:engine/model/operation/nooperation~NoOperation.classNameName of the operation class used for serialization.
Methods
constructor( baseVersion )inheritedmodule:engine/model/operation/nooperation~NoOperation#constructorBase operation constructor.
Parameters
baseVersion : null | numberDocument
versionon which operation can be applied ornullif the operation operates on detached (non-document) tree.
clone() → NoOperationmodule:engine/model/operation/nooperation~NoOperation#cloneCreates and returns an operation that has the same parameters as this operation.
Returns
getReversed() → Operationmodule:engine/model/operation/nooperation~NoOperation#getReversedtoJSON() → unknowninheritedmodule:engine/model/operation/nooperation~NoOperation#toJSONCustom toJSON method to solve child-parent circular dependencies.
Returns
unknownClone of this object with the operation property replaced with string.
_execute() → voidinternalmodule:engine/model/operation/nooperation~NoOperation#_execute_validate() → voidinternalinheritedmodule:engine/model/operation/nooperation~NoOperation#_validateChecks whether the operation's parameters are correct and the operation can be correctly executed. Throws an error if operation is not valid.
Returns
void
Static methods
module:engine/model/operation/nooperation~NoOperation.fromJSONCreates
Operationobject from deserialized object, i.e. from parsed JSON string.Parameters
json : anyDeserialized JSON object.
document : ModelDocumentDocument on which this operation will be applied.
Returns