diff options
| author | jmoenig <jens@moenig.org> | 2014-10-06 10:34:56 +0200 |
|---|---|---|
| committer | jmoenig <jens@moenig.org> | 2014-10-06 10:34:56 +0200 |
| commit | 2ae675132a52b8fdb3bd52e80db858500de9f265 (patch) | |
| tree | 521c9eb01ecadc7b2daa73651dfb5aa5b6eb5850 /objects.js | |
| parent | 45e1f3193b6a0593f084df28ee3d8f194bcea448 (diff) | |
| download | snap-yow-2ae675132a52b8fdb3bd52e80db858500de9f265.tar.gz snap-yow-2ae675132a52b8fdb3bd52e80db858500de9f265.zip | |
fixed #604. Thanks, @Gubolin!
Diffstat (limited to 'objects.js')
| -rw-r--r-- | objects.js | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -125,7 +125,7 @@ PrototypeHatBlockMorph*/ // Global stuff //////////////////////////////////////////////////////// -modules.objects = '2014-October-01'; +modules.objects = '2014-October-06'; var SpriteMorph; var StageMorph; @@ -4378,8 +4378,12 @@ StageMorph.prototype.drawOn = function (aCanvas, aRect) { ); // pen trails - ws = w / this.scale; - hs = h / this.scale; + ws = Math.floor( + Math.min(w / this.scale, this.image.width * this.scale) + ); + hs = Math.floor( + Math.min(h / this.scale, this.image.height * this.scale) + ); context.save(); context.scale(this.scale, this.scale); context.drawImage( |
