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
master
Jeff Schiller 2010-11-13 10:01:19 +00:00
parent d5ae56ea8e
commit e75b51e182
1 changed files with 2 additions and 1 deletions

View File

@ -75,6 +75,7 @@ svgedit.history.MoveElementCommand.prototype.getText = function() {
// Function: svgedit.history.MoveElementCommand.apply // Function: svgedit.history.MoveElementCommand.apply
// Re-positions the element // Re-positions the element
svgedit.history.MoveElementCommand.prototype.apply = function(handler) { svgedit.history.MoveElementCommand.prototype.apply = function(handler) {
// TODO(codedread): Refactor this common event code into a base HistoryCommand class.
if (handler) { if (handler) {
handler.handleHistoryEvent(svgedit.history.HistoryEventTypes.BEFORE_APPLY, this); handler.handleHistoryEvent(svgedit.history.HistoryEventTypes.BEFORE_APPLY, this);
} }
@ -385,7 +386,7 @@ svgedit.history.BatchCommand.prototype.apply = function(handler) {
var len = this.stack.length; var len = this.stack.length;
for (var i = 0; i < len; ++i) { for (var i = 0; i < len; ++i) {
this.stack[i].apply(); this.stack[i].apply(handler);
} }
if (handler) { if (handler) {