From 2ae675132a52b8fdb3bd52e80db858500de9f265 Mon Sep 17 00:00:00 2001 From: jmoenig Date: Mon, 6 Oct 2014 10:34:56 +0200 Subject: fixed #604. Thanks, @Gubolin! --- objects.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'objects.js') diff --git a/objects.js b/objects.js index 905b3d1..17450dd 100644 --- a/objects.js +++ b/objects.js @@ -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( -- cgit v1.3.1