diff --git a/website/include/importerapp.js b/website/include/importerapp.js index 1623dba..9331718 100644 --- a/website/include/importerapp.js +++ b/website/include/importerapp.js @@ -69,6 +69,9 @@ ImporterApp.prototype.Init = function () var match = window.matchMedia ('(max-device-width : 600px)'); this.isMobile = match.matches; + window.addEventListener ('resize', this.Resize.bind (this), false); + this.Resize (); + var canvasName = 'modelcanvas'; this.canvas = $('#' + canvasName); this.RegisterCanvasClick (); @@ -81,9 +84,6 @@ ImporterApp.prototype.Init = function () var fileInput = document.getElementById ('file'); fileInput.addEventListener ('change', this.FileSelected.bind (this), false); - window.addEventListener ('resize', this.Resize.bind (this), false); - this.Resize (); - window.onhashchange = this.LoadFilesFromHash.bind (this); var hasHashModel = this.LoadFilesFromHash (); if (!hasHashModel && !this.isMobile) { @@ -165,17 +165,12 @@ ImporterApp.prototype.Resize = function () var canvas = document.getElementById ('modelcanvas'); var height = document.body.clientHeight - top.offsetHeight; - SetHeight (canvas, 0); - SetWidth (canvas, 0); - SetHeight (left, height); - SetHeight (canvas, height); SetWidth (canvas, document.body.clientWidth - left.offsetWidth); this.introControl.Resize (); this.floatingDialog.Resize (); - this.viewer.Draw (); }; ImporterApp.prototype.JsonLoaded = function (progressBar)