mirror of
https://github.com/piskelapp/piskel.git
synced 2023-08-10 21:12:52 +03:00
Fixed initialization bug + performance issue with jquery pub sub
This commit is contained in:
parent
8982a5b479
commit
7b90873324
@ -83,7 +83,7 @@ $.namespace("pskl");
|
|||||||
});
|
});
|
||||||
|
|
||||||
$.subscribe('FRAMESHEET_RESET', function(evt, frameId) {
|
$.subscribe('FRAMESHEET_RESET', function(evt, frameId) {
|
||||||
piskel.redraw();
|
piskel.render();
|
||||||
});
|
});
|
||||||
var drawingLoop = new pskl.rendering.DrawingLoop();
|
var drawingLoop = new pskl.rendering.DrawingLoop();
|
||||||
drawingLoop.addCallback(this.render, this);
|
drawingLoop.addCallback(this.render, this);
|
||||||
|
@ -85,11 +85,6 @@
|
|||||||
context.fillStyle = color;
|
context.fillStyle = color;
|
||||||
context.fillRect(this.getFramePos_(col), this.getFramePos_(row), this.dpi, this.dpi);
|
context.fillRect(this.getFramePos_(col), this.getFramePos_(row), this.dpi, this.dpi);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(color != Constants.SELECTION_TRANSPARENT_COLOR) {
|
|
||||||
// TODO(vincz): Found a better design to update the palette, it's called too frequently.
|
|
||||||
$.publish(Events.COLOR_USED, [color]);
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
ns.FrameRenderer.prototype.clear = function (frame) {
|
ns.FrameRenderer.prototype.clear = function (frame) {
|
||||||
|
Loading…
Reference in New Issue
Block a user