mirror of
https://github.com/piskelapp/piskel.git
synced 2023-08-10 21:12:52 +03:00
ok this one is chaos
This commit is contained in:
@@ -18,7 +18,7 @@
|
||||
};
|
||||
this.renderer = new pskl.rendering.frame.FrameRenderer(this.container, renderingOptions);
|
||||
|
||||
$.subscribe(Events.FRAME_SIZE_CHANGED, this.updateZoom_.bind(this));
|
||||
$.subscribe(Events.FRAME_SIZE_CHANGED, this.onFrameSizeChange_.bind(this));
|
||||
};
|
||||
|
||||
ns.AnimatedPreviewController.prototype.init = function () {
|
||||
@@ -67,10 +67,11 @@
|
||||
return Math.min(hZoom, wZoom);
|
||||
};
|
||||
|
||||
ns.AnimatedPreviewController.prototype.updateZoom_ = function () {
|
||||
ns.AnimatedPreviewController.prototype.onFrameSizeChange_ = function () {
|
||||
var frame = this.piskelController.getCurrentFrame();
|
||||
var zoom = this.calculateZoom_();
|
||||
this.renderer.setZoom(zoom);
|
||||
this.renderer.setDisplaySize(frame.getWidth() * zoom, frame.getHeight() * zoom);
|
||||
this.renderer.setZoom(zoom);
|
||||
this.renderer.setOffset(0, 0);
|
||||
};
|
||||
})();
|
||||
Reference in New Issue
Block a user