From dd0b9f63d3ecc1719c53ab985147a5cc4f99815a Mon Sep 17 00:00:00 2001 From: Andrea Bogazzi Date: Sat, 21 May 2016 16:07:00 +0200 Subject: [PATCH] fix multi line selection regression introduced with #2996 --- src/shapes/itext.class.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/shapes/itext.class.js b/src/shapes/itext.class.js index 6862c25a510..26c33cc1293 100644 --- a/src/shapes/itext.class.js +++ b/src/shapes/itext.class.js @@ -515,7 +515,7 @@ end = this.get2DCursorLocation(this.selectionEnd), startLine = start.lineIndex, endLine = end.lineIndex; - + ctx.clearRect(-this.width / 2, -this.height / 2, this.width, this.height); for (var i = startLine; i <= endLine; i++) { var lineOffset = this._getLineLeftOffset(this._getLineWidth(ctx, i)) || 0, lineHeight = this._getHeightOfLine(this.ctx, i), @@ -539,7 +539,6 @@ boxWidth += this._getWidthOfChar(ctx, line[j2], i, j2); } } - ctx.clearRect(-this.width / 2, -this.height / 2, this.width, this.height); ctx.fillRect( boundaries.left + lineOffset, boundaries.top + boundaries.topOffset,