From 8ff8b1b3738c5dc7603f585dfa7cb6a434b368fd Mon Sep 17 00:00:00 2001 From: Code WvS Date: Wed, 4 Mar 2015 18:05:55 +0100 Subject: change map size to (nearly) full window size in app mode --- objects.js | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/objects.js b/objects.js index cda809c..13f78dc 100644 --- a/objects.js +++ b/objects.js @@ -4579,10 +4579,19 @@ StageMorph.prototype.drawNew = function () { StageMorph.prototype.drawOn = function (aCanvas, aRect) { var map = document.getElementById('map'); - map.style.width = this.dimensions.x * this.scale + 'px'; - map.style.height = this.dimensions.y * this.scale + 'px'; - map.style.left = this.left() + 'px'; - map.style.top = this.top() + 'px'; + ide = this.parentThatIsA(IDE_Morph); + + if (!ide.isAppMode) { + map.style.left = this.left() + 'px'; + map.style.top = this.top() + 'px'; + map.style.width = this.dimensions.x * this.scale + 'px'; + map.style.height = this.dimensions.y * this.scale + 'px'; + } else { + map.style.left = ide.left() + 'px'; + map.style.top = this.top() + 'px'; + map.style.width = ide.extent().x + 'px'; + map.style.height = (ide.extent().y - this.top()) + 'px'; + } window.map.invalidateSize(); }; -- cgit v1.3.1