Permalink
Browse files

Name all the undoAdd() calls.

  • Loading branch information...
1 parent 0fa0389 commit 8c32d93debfa464e7a4dde977ae0d84f80d16275 @mythmon mythmon committed May 10, 2012
Showing with 7 additions and 7 deletions.
  1. +1 −1 web/js/board.js
  2. +6 −6 web/js/reductions.js
View
@@ -78,7 +78,7 @@ var Board = Class.extend({
]
// initialize the board state for future undos.
- self.undoAdd();
+ self.undoAdd('initial');
},
redraw: function(self) {
View
@@ -527,7 +527,7 @@ var SeriesReduction = Reduction.extend({
}
}
self.prettify_resistor(r);
- self.board.undoAdd();
+ self.board.undoAdd('series');
return true;
} else {
return false;
@@ -610,7 +610,7 @@ var ParallelReduction = Reduction.extend({
}
}
self.prettify_resistor(r);
- self.board.undoAdd();
+ self.board.undoAdd('parallel');
return true;
} else {
return false;
@@ -669,7 +669,7 @@ var RemoveReduction = Reduction.extend({
resistors[i].remove();
}
}
- self.board.undoAdd();
+ self.board.undoAdd('remove');
return true;
} else {
return false;
@@ -738,7 +738,7 @@ var DeltaWyeReduction = Reduction.extend({
resistors[2].resistance = corn3_res;
self.prettify_wye(resistors);
- self.board.undoAdd();
+ self.board.undoAdd('deltawye');
return true;
} else {
return false;
@@ -848,7 +848,7 @@ var WyeDeltaReduction = Reduction.extend({
self.prettify_delta(delta);
- self.board.undoAdd();
+ self.board.undoAdd('wyedelta');
return true;
} else {
return false;
@@ -933,7 +933,7 @@ var PrettifyReduction = Reduction.extend({
reduce: function(self, resistors) {
self._super(resistors);
self.prettify_all();
- self.board.undoAdd();
+ self.board.undoAdd('prettify');
},
});

0 comments on commit 8c32d93

Please sign in to comment.