Skip to content

Commit

Permalink
Fix transformMatrix not affecting text. Closes fabricjs#1031
Browse files Browse the repository at this point in the history
  • Loading branch information
kangax committed Dec 7, 2013
1 parent 6f88508 commit 37afbc2
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 2 deletions.
4 changes: 4 additions & 0 deletions dist/all.js
Original file line number Diff line number Diff line change
Expand Up @@ -17929,6 +17929,10 @@ fabric.Image.filters.BaseFilter = fabric.util.createClass(/** @lends fabric.Imag
if (!this.visible) return;

ctx.save();
var m = this.transformMatrix;
if (m && !this.group) {
ctx.setTransform(m[0], m[1], m[2], m[3], m[4], m[5]);
}
this._render(ctx);
if (!noTransform && this.active) {
this.drawBorders(ctx);
Expand Down
4 changes: 2 additions & 2 deletions dist/all.min.js

Large diffs are not rendered by default.

Binary file modified dist/all.min.js.gz
Binary file not shown.
4 changes: 4 additions & 0 deletions dist/all.require.js
Original file line number Diff line number Diff line change
Expand Up @@ -17929,6 +17929,10 @@ fabric.Image.filters.BaseFilter = fabric.util.createClass(/** @lends fabric.Imag
if (!this.visible) return;

ctx.save();
var m = this.transformMatrix;
if (m && !this.group) {
ctx.setTransform(m[0], m[1], m[2], m[3], m[4], m[5]);
}
this._render(ctx);
if (!noTransform && this.active) {
this.drawBorders(ctx);
Expand Down
4 changes: 4 additions & 0 deletions src/shapes/text.class.js
Original file line number Diff line number Diff line change
Expand Up @@ -767,6 +767,10 @@
if (!this.visible) return;

ctx.save();
var m = this.transformMatrix;
if (m && !this.group) {
ctx.setTransform(m[0], m[1], m[2], m[3], m[4], m[5]);
}
this._render(ctx);
if (!noTransform && this.active) {
this.drawBorders(ctx);
Expand Down

0 comments on commit 37afbc2

Please sign in to comment.