mirror of
https://github.com/Hopiu/fabric.js.git
synced 2026-05-23 20:55:47 +00:00
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:
parent
a6a5cb4a54
commit
6caf60670b
1 changed files with 2 additions and 2 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue