Merge pull request #2005 from asturur/Fix-iText-position-bug-when-style-is-empty

Fix misplacement of some iText
This commit is contained in:
Juriy Zaytsev 2015-03-01 19:27:28 +01:00
commit 16d636e1de

View file

@ -736,7 +736,9 @@
_renderTextLine: function(method, ctx, line, left, top, lineIndex) {
// to "cancel" this.fontSize subtraction in fabric.Text#_renderTextLine
// the adding 0.03 is just to align text with itext by overlap test
top += this.fontSize * (this._fontSizeFraction + 0.03);
if (!this.isEmptyStyles()) {
top += this.fontSize * (this._fontSizeFraction + 0.03);
}
this.callSuper('_renderTextLine', method, ctx, line, left, top, lineIndex);
},