mirror of
https://github.com/Hopiu/fabric.js.git
synced 2026-05-02 11:04:43 +00:00
Merge pull request #2005 from asturur/Fix-iText-position-bug-when-style-is-empty
Fix misplacement of some iText
This commit is contained in:
commit
16d636e1de
1 changed files with 3 additions and 1 deletions
|
|
@ -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);
|
||||
},
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue