From e75b51e1827007df8b748217829b0659448561ac Mon Sep 17 00:00:00 2001 From: Jeff Schiller Date: Sat, 13 Nov 2010 10:01:19 +0000 Subject: [PATCH] Pass history event handler down to batch command's subcommands on apply git-svn-id: http://svg-edit.googlecode.com/svn/trunk@1868 eee81c28-f429-11dd-99c0-75d572ba1ddd --- editor/history.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/editor/history.js b/editor/history.js index 6a7ee367..ed2788d9 100644 --- a/editor/history.js +++ b/editor/history.js @@ -75,6 +75,7 @@ svgedit.history.MoveElementCommand.prototype.getText = function() { // Function: svgedit.history.MoveElementCommand.apply // Re-positions the element svgedit.history.MoveElementCommand.prototype.apply = function(handler) { + // TODO(codedread): Refactor this common event code into a base HistoryCommand class. if (handler) { handler.handleHistoryEvent(svgedit.history.HistoryEventTypes.BEFORE_APPLY, this); } @@ -385,7 +386,7 @@ svgedit.history.BatchCommand.prototype.apply = function(handler) { var len = this.stack.length; for (var i = 0; i < len; ++i) { - this.stack[i].apply(); + this.stack[i].apply(handler); } if (handler) {