Skip to content

Commit

Permalink
fix multi line selection regression introduced with #2996
Browse files Browse the repository at this point in the history
  • Loading branch information
asturur committed May 21, 2016
1 parent dfb5e4e commit dd0b9f6
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/shapes/itext.class.js
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand All @@ -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,
Expand Down

0 comments on commit dd0b9f6

Please sign in to comment.