From: Aleksander Ɓukasz Date: Tue, 18 Feb 2014 14:24:15 +0000 (+0100) Subject: smartxml: signal that operation ended X-Git-Url: https://git.mdrn.pl/fnpeditor.git/commitdiff_plain/5f121e33df901aa33a79b2896e79759da6411948?hp=c782c7a4d11b830dd1c6efed0b382e33b56a790b smartxml: signal that operation ended The following events are considered as operation: 1. running transaction and redoing transaction 2. undoing transaction --- diff --git a/src/smartxml/smartxml.js b/src/smartxml/smartxml.js index dcecc64..c8799f1 100644 --- a/src/smartxml/smartxml.js +++ b/src/smartxml/smartxml.js @@ -550,6 +550,7 @@ $.extend(Document.prototype, Backbone.Events, { this._undoInProgress = false; this.redoStack.push(transaction); + this.trigger('operationEnd'); } }, redo: function() { @@ -561,6 +562,8 @@ $.extend(Document.prototype, Backbone.Events, { }); this._transformationLevel--; this.undoStack.push(transaction); + this.trigger('operationEnd'); + } }, @@ -578,6 +581,7 @@ $.extend(Document.prototype, Backbone.Events, { } if(this._currentTransaction.hasTransformations()) { this.undoStack.push(this._currentTransaction); + this.trigger('operationEnd'); } this._currentTransaction = null; },