Fix misplacement of some iText

This commit is contained in:
Andrea Bogazzi 2015-03-01 19:05:50 +01:00
parent 4ad253ffba
commit b89bc01847

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);
},