transform: function(Transformation, args) {
//console.log('transform');
var toret, transformation;
+ //debugger;
// ref: odrebnie przygotowanie transformacji, odrebnie jej wykonanie (to pierwsze to analog transform z node)
}
if(transformation) {
this._transformationLevel++;
- toret = transformation.run();
+ toret = transformation.run({beUndoable:this._transformationLevel === 1});
if(this._transformationLevel === 1 && !this._undoInProgress) {
this.undoStack.push(transformation);
}
var transformation = this.redoStack.pop();
if(transformation) {
this._transformationLevel++;
- transformation.run();
+ transformation.run({beUndoable: true});
this._transformationLevel--;
this.undoStack.push(transformation);
+
}
},
};
_.extend(GenericTransformation.prototype, {
name: name,
- run: function() {
+ run: function(options) {
var changeRoot;
- if(!desc.undo) {
+ if(!desc.undo && options.beUndoable) {
changeRoot = desc.getChangeRoot ? desc.getChangeRoot.call(this) : this.document.root;
this.snapshot = changeRoot.clone();
this.changeRootPath = changeRoot.getPath();