kopia lustrzana https://github.com/backface/turtlestitch
rodzic
2ae675132a
commit
5f3279990b
|
@ -2305,3 +2305,7 @@ ______
|
||||||
141006
|
141006
|
||||||
------
|
------
|
||||||
* GUI, Objects: fixed #604. Thanks, @Gubolin!
|
* GUI, Objects: fixed #604. Thanks, @Gubolin!
|
||||||
|
|
||||||
|
141008
|
||||||
|
------
|
||||||
|
* Objects: fixed #608, #610
|
||||||
|
|
26
objects.js
26
objects.js
|
@ -125,7 +125,7 @@ PrototypeHatBlockMorph*/
|
||||||
|
|
||||||
// Global stuff ////////////////////////////////////////////////////////
|
// Global stuff ////////////////////////////////////////////////////////
|
||||||
|
|
||||||
modules.objects = '2014-October-06';
|
modules.objects = '2014-October-08';
|
||||||
|
|
||||||
var SpriteMorph;
|
var SpriteMorph;
|
||||||
var StageMorph;
|
var StageMorph;
|
||||||
|
@ -4378,14 +4378,11 @@ StageMorph.prototype.drawOn = function (aCanvas, aRect) {
|
||||||
);
|
);
|
||||||
|
|
||||||
// pen trails
|
// pen trails
|
||||||
ws = Math.floor(
|
ws = w / this.scale;
|
||||||
Math.min(w / this.scale, this.image.width * this.scale)
|
hs = h / this.scale;
|
||||||
);
|
|
||||||
hs = Math.floor(
|
|
||||||
Math.min(h / this.scale, this.image.height * this.scale)
|
|
||||||
);
|
|
||||||
context.save();
|
context.save();
|
||||||
context.scale(this.scale, this.scale);
|
context.scale(this.scale, this.scale);
|
||||||
|
try {
|
||||||
context.drawImage(
|
context.drawImage(
|
||||||
this.penTrails(),
|
this.penTrails(),
|
||||||
src.left() / this.scale,
|
src.left() / this.scale,
|
||||||
|
@ -4397,6 +4394,21 @@ StageMorph.prototype.drawOn = function (aCanvas, aRect) {
|
||||||
ws,
|
ws,
|
||||||
hs
|
hs
|
||||||
);
|
);
|
||||||
|
} catch (err) { // sometimes triggered only by Firefox
|
||||||
|
// console.log(err);
|
||||||
|
context.restore();
|
||||||
|
context.drawImage(
|
||||||
|
this.penTrails(),
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
this.dimensions.x,
|
||||||
|
this.dimensions.y,
|
||||||
|
this.left(),
|
||||||
|
this.top(),
|
||||||
|
this.dimensions.x * this.scale,
|
||||||
|
this.dimensions.y * this.scale
|
||||||
|
);
|
||||||
|
}
|
||||||
context.restore();
|
context.restore();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Ładowanie…
Reference in New Issue