From e893cb1325be6300bf0351a166214b2def9d9788 Mon Sep 17 00:00:00 2001 From: DD Date: Wed, 24 Oct 2018 17:35:30 -0400 Subject: [PATCH] Clean up/ --- src/svg/SvgImport.js | 1 - src/text/PointText.js | 8 ++++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/svg/SvgImport.js b/src/svg/SvgImport.js index cde26c4d..09e3da44 100644 --- a/src/svg/SvgImport.js +++ b/src/svg/SvgImport.js @@ -140,7 +140,6 @@ new function() { } function importGradient(node, type) { - debugger; var id = (getValue(node, 'href', true) || '').substring(1), radial = type === 'radialgradient', gradient; diff --git a/src/text/PointText.js b/src/text/PointText.js index a99a3901..ad0141a7 100644 --- a/src/text/PointText.js +++ b/src/text/PointText.js @@ -105,7 +105,7 @@ var PointText = TextItem.extend(/** @lends PointText# */{ var rect = options.drawnTextBounds ? this._getDrawnTextSize() : this._getMeasuredTextSize(); return matrix ? matrix._transformBounds(rect, rect) : rect; }, - _getMeasuredTextSize () { + _getMeasuredTextSize: function() { var style = this._style, lines = this._lines, numLines = lines.length, @@ -122,7 +122,7 @@ var PointText = TextItem.extend(/** @lends PointText# */{ numLines ? - 0.75 * leading : 0, width, numLines * leading); }, - _getDrawnTextSize () { + _getDrawnTextSize: function() { var numLines = this._lines.length; var leading = this._style.getLeading(); @@ -132,7 +132,7 @@ var PointText = TextItem.extend(/** @lends PointText# */{ xmlns: SvgElement.svg }); var node = SvgElement.create('text'); - node.setAttributeNS('http://www.w3.org/XML/1998/namespace', 'xml:space', 'preserve') + node.setAttributeNS('http://www.w3.org/XML/1998/namespace', 'xml:space', 'preserve'); svg.appendChild(node); for (var i = 0; i < numLines; i++) { var tspanNode = SvgElement.create('tspan', { @@ -147,7 +147,7 @@ var PointText = TextItem.extend(/** @lends PointText# */{ var element = document.createElement('span'); element.style.visibility = ('hidden'); element.style.whiteSpace = 'pre'; - element.style.fontSize = `${this.fontSize}px`; + element.style.fontSize = this.fontSize + 'px'; element.style.fontFamily = this.font; element.style.lineHeight = this.leading / this.fontSize;