Fixes Center/Right aligned cursor placement

Fixes Center/Right aligned cursor placement by mouse click when the text box is scaled
This commit is contained in:
GordoRank 2014-01-14 13:58:06 +00:00
parent 272859b8f1
commit 77f304bed0

View file

@ -212,7 +212,7 @@ fabric.util.object.extend(fabric.IText.prototype, /** @lends fabric.IText.protot
var widthOfLine = this._getWidthOfLine(this.ctx, i, textLines);
var lineLeftOffset = this._getLineLeftOffset(widthOfLine);
width = lineLeftOffset;
width = lineLeftOffset * this.scaleX;
if (this.flipX) {
// when oject is horizontally flipped we reverse chars