summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCode WvS <code-wvs@quantentunnel.de>2015-02-07 12:13:20 +0100
committerCode WvS <code-wvs@quantentunnel.de>2015-02-07 12:13:20 +0100
commit9796a36568022b0e59d76de9a5a13b5aefbd8a09 (patch)
treeaae0ce5223522712786ba76d57b88bcc77212992
parent429b7bfc25fd6a71243f18c4bf626a1f8164b3e8 (diff)
downloadsnap-yow-9796a36568022b0e59d76de9a5a13b5aefbd8a09.tar.gz
snap-yow-9796a36568022b0e59d76de9a5a13b5aefbd8a09.zip
resize the map properly
-rw-r--r--objects.js7
1 files 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();
}
};