Set preview render flag when updating TILED_PREVIEW seW

This commit is contained in:
jdescottes 2015-03-03 23:50:19 +01:00
parent fe95abca0f
commit 43e60e300c
2 changed files with 4 additions and 0 deletions

View File

@ -1,6 +1,8 @@
(function () {
var ns = $.namespace('pskl.controller.preview');
var POPUP_TITLE = 'Piskel - preview';
ns.PopupPreviewController = function (piskelController) {
this.piskelController = piskelController;
this.popup = null;
@ -25,6 +27,7 @@
};
ns.PopupPreviewController.prototype.onPopupLoaded = function () {
this.popup.document.title = POPUP_TITLE;
pskl.utils.Event.addEventListener(this.popup, 'resize', this.onWindowResize_, this);
pskl.utils.Event.addEventListener(this.popup, 'unload', this.onPopupClosed_, this);
var container = this.popup.document.querySelector('.preview-container');

View File

@ -86,6 +86,7 @@
var isTiled = pskl.UserSettings.get(pskl.UserSettings.TILED_PREVIEW);
var zoom = isTiled ? 1 : this.calculateZoom_();
this.renderer.setZoom(zoom);
this.setRenderFlag_(true);
};
ns.PreviewController.prototype.getZoom = function () {