Simplified SAVE STATE events, added wrap method to easily build decorators

This commit is contained in:
juliandescottes
2014-04-20 13:15:30 +02:00
parent 8335c07519
commit c2a3ccc8d0
11 changed files with 119 additions and 201 deletions

View File

@@ -19,14 +19,10 @@
ns.PaintBucket.prototype.applyToolAt = function(col, row, color, frame, overlay, event) {
pskl.PixelUtils.paintSimilarConnectedPixelsFromFrame(frame, col, row, color);
$.publish(Events.PISKEL_SAVE_STATE, {
type : 'TOOL',
tool : this,
replay : {
col : col,
row : row,
color : color
}
this.raiseSaveStateEvent({
col : col,
row : row,
color : color
});
};