mirror of
https://github.com/piskelapp/piskel.git
synced 2023-08-10 21:12:52 +03:00
Cleaned FrameRenderer.js FrameRenderer should also keep a reference on the frame it is updating - initially I wanted the renderer to be frame independant, but it doesnt bring much
This commit is contained in:
@ -206,13 +206,11 @@
|
||||
this.renderer.updateDPI(newDPI);
|
||||
this.overlayRenderer.updateDPI(newDPI);
|
||||
|
||||
this.renderer.render(this.frame);
|
||||
this.overlayRenderer.render(this.overlayFrame);
|
||||
this.render();
|
||||
};
|
||||
|
||||
ns.DrawingController.prototype.render = function () {
|
||||
try {
|
||||
|
||||
this.renderFrame();
|
||||
this.renderOverlay();
|
||||
} catch (e) {
|
||||
@ -236,12 +234,11 @@
|
||||
var serializedOverlay = this.overlayFrame.serialize();
|
||||
if (this.serializedOverlay != serializedOverlay) {
|
||||
this.serializedOverlay = serializedOverlay
|
||||
this.renderer.render(this.overlayFrame);
|
||||
this.overlayRenderer.render(this.overlayFrame);
|
||||
}
|
||||
};
|
||||
|
||||
ns.DrawingController.prototype.clearOverlay = function () {
|
||||
this.overlayFrame = pskl.model.Frame.createEmptyFromFrame(this.frame);
|
||||
this.overlayRenderer.clear();
|
||||
};
|
||||
})();
|
Reference in New Issue
Block a user