summaryrefslogtreecommitdiff
path: root/objects.js
diff options
context:
space:
mode:
authorCode WvS <code-wvs@quantentunnel.de>2015-03-04 18:05:55 +0100
committerCode WvS <code-wvs@quantentunnel.de>2015-03-04 18:05:55 +0100
commit8ff8b1b3738c5dc7603f585dfa7cb6a434b368fd (patch)
tree324a7a1ef3f7305752156c0991efcf233cf942a5 /objects.js
parentd91fb9e8961e67476b2532ce45291ad44f63d74a (diff)
downloadsnap-yow-8ff8b1b3738c5dc7603f585dfa7cb6a434b368fd.tar.gz
snap-yow-8ff8b1b3738c5dc7603f585dfa7cb6a434b368fd.zip
change map size to (nearly) full window size in app mode
Diffstat (limited to 'objects.js')
-rw-r--r--objects.js17
1 files 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();
};