diff options
| author | Code WvS <code-wvs@quantentunnel.de> | 2015-02-07 12:13:20 +0100 |
|---|---|---|
| committer | Code WvS <code-wvs@quantentunnel.de> | 2015-02-07 12:13:20 +0100 |
| commit | 9796a36568022b0e59d76de9a5a13b5aefbd8a09 (patch) | |
| tree | aae0ce5223522712786ba76d57b88bcc77212992 /objects.js | |
| parent | 429b7bfc25fd6a71243f18c4bf626a1f8164b3e8 (diff) | |
| download | snap-yow-9796a36568022b0e59d76de9a5a13b5aefbd8a09.tar.gz snap-yow-9796a36568022b0e59d76de9a5a13b5aefbd8a09.zip | |
resize the map properly
Diffstat (limited to 'objects.js')
| -rw-r--r-- | objects.js | 7 |
1 files changed, 3 insertions, 4 deletions
@@ -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(); } }; |
