Fixed _renderFill - fallback for offsetX/offsetY

If object.fill.offsetX or object.fill.offsetY is undefined (e.g. fill = fabric.Gradient) browser might have problems (seen in firefox 3.6.28).
This commit is contained in:
Stefan Kienzle 2013-04-30 16:27:01 +03:00
parent a6a5cb4a54
commit 6caf60670b

View file

@ -663,8 +663,8 @@
if (this.fill.toLive) {
ctx.save();
ctx.translate(
-this.width / 2 + this.fill.offsetX,
-this.height / 2 + this.fill.offsetY);
-this.width / 2 + this.fill.offsetX || 0,
-this.height / 2 + this.fill.offsetY || 0);
}
ctx.fill();
if (this.fill.toLive) {