From 9796a36568022b0e59d76de9a5a13b5aefbd8a09 Mon Sep 17 00:00:00 2001 From: Code WvS Date: Sat, 7 Feb 2015 12:13:20 +0100 Subject: resize the map properly --- objects.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/objects.js b/objects.js index 41f2a36..c0e4dfc 100644 --- a/objects.js +++ b/objects.js @@ -4437,8 +4437,6 @@ StageMorph.prototype.drawNew = function () { StageMorph.prototype.drawOn = function (aCanvas, aRect) { var map = document.getElementById('map'); - - // make sure to draw the pen trails canvas as well var rectangle, area, delta, src, w, h, sl, st; if (!this.isVisible) { return null; @@ -4457,10 +4455,11 @@ StageMorph.prototype.drawOn = function (aCanvas, aRect) { if (w < 1 || h < 1) { return null; } - map.style.width = w + 'px'; - map.style.height = h + 'px'; + map.style.width = this.dimensions.x * this.scale + 'px'; + map.style.height = this.dimensions.y * this.scale + 'px'; map.style.left = area.left() + 'px'; map.style.top = area.top() + 'px'; + window.map.invalidateSize(); } }; -- cgit v1.3.1