mirror of
https://github.com/Hopiu/fabric.js.git
synced 2026-04-10 09:20:58 +00:00
Update text.class.js
This commit is contained in:
parent
c461792a39
commit
41a3aa8a4c
1 changed files with 3 additions and 2 deletions
|
|
@ -926,7 +926,8 @@
|
|||
|
||||
_setSVGTextLineText: function(i, textSpans, height, textLeftOffset, textTopOffset) {
|
||||
var yPos = this.fontSize * (this._fontSizeMult - this._fontSizeFraction)
|
||||
- textTopOffset + height - this.height / 2;
|
||||
- textTopOffset + height - this.height / 2,
|
||||
textLine = this.textAlign === 'justify' ? this._setSVGTextLineWords(i) : fabric.util.string.escapeXml(._textLines[i]);
|
||||
textSpans.push(
|
||||
'<tspan x="',
|
||||
toFixed(textLeftOffset + this._getLineLeftOffset(this._getLineWidth(this.ctx, i)), NUM_FRACTION_DIGITS), '" ',
|
||||
|
|
@ -936,7 +937,7 @@
|
|||
// doing this on <tspan> elements since setting opacity
|
||||
// on containing <text> one doesn't work in Illustrator
|
||||
this._getFillAttributes(this.fill), '>',
|
||||
fabric.util.string.escapeXml(this._textLines[i]),
|
||||
textLine,
|
||||
'</tspan>'
|
||||
);
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in a new issue