summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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();
};