diff --git a/src/shapes/itext.class.js b/src/shapes/itext.class.js index f771715e003..4ddff7a056c 100644 --- a/src/shapes/itext.class.js +++ b/src/shapes/itext.class.js @@ -271,7 +271,6 @@ this._clearTextArea(ctx); skipRestore || ctx.restore(); }, - /** * Renders cursor or selection (depending on what exists) * it does on the contextTop. If contextTop is not available, do nothing. diff --git a/src/shapes/object.class.js b/src/shapes/object.class.js index 57fd8005b4c..ff360b66fad 100644 --- a/src/shapes/object.class.js +++ b/src/shapes/object.class.js @@ -809,13 +809,9 @@ * @param {CanvasRenderingContext2D} ctx Context */ transform: function(ctx) { - var m; - if (this.group && !this.group._transformDone) { - m = this.calcTransformMatrix(); - } - else { - m = this.calcOwnMatrix(); - } + var needFullTransform = (this.group && !this.group._transformDone) || + (this.group && this.canvas && ctx === this.canvas.contextTop); + var m = this.calcTransformMatrix(!needFullTransform); ctx.transform(m[0], m[1], m[2], m[3], m[4], m[5]); },