Skip to content

Commit

Permalink
Merge pull request #2120 from asturur/fix-render-preserve
Browse files Browse the repository at this point in the history
Fix render preserve
  • Loading branch information
kangax committed Apr 17, 2015
2 parents 35a9afb + 6c24ec0 commit 0f502a5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/shapes/object.class.js
Original file line number Diff line number Diff line change
Expand Up @@ -748,6 +748,9 @@
* @param {Boolean} fromLeft When true, context is transformed to object's top/left corner. This is used when rendering text on Node
*/
transform: function(ctx, fromLeft) {
if (this.group && this.canvas.preserveObjectStacking && this.group === this.canvas._activeGroup) {
this.group.transform(ctx);
}
var center = fromLeft ? this._getLeftTopCoords() : this.getCenterPoint();
ctx.translate(center.x, center.y);
ctx.rotate(degreesToRadians(this.angle));
Expand Down

0 comments on commit 0f502a5

Please sign in to comment.