From 41a3aa8a4ce76f84d031e8fd75458d5887e6bd73 Mon Sep 17 00:00:00 2001 From: Andrea Bogazzi Date: Tue, 8 Dec 2015 11:52:07 +0100 Subject: [PATCH] Update text.class.js --- src/shapes/text.class.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/shapes/text.class.js b/src/shapes/text.class.js index fd9fc500..965656bd 100644 --- a/src/shapes/text.class.js +++ b/src/shapes/text.class.js @@ -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( ' elements since setting opacity // on containing one doesn't work in Illustrator this._getFillAttributes(this.fill), '>', - fabric.util.string.escapeXml(this._textLines[i]), + textLine, '' ); },