aboutsummaryrefslogtreecommitdiffstats
path: root/src/text.js
diff options
context:
space:
mode:
authorUlrich-Matthias Schäfer <ulima.ums@googlemail.com>2017-07-25 14:19:49 +0200
committerUlrich-Matthias Schäfer <ulima.ums@googlemail.com>2017-07-25 14:19:49 +0200
commitee0b340bfeb2430767d4a2850413f864c42e5405 (patch)
tree7cb4fe28d59643b2054edd6ae5c33ed8d2b33987 /src/text.js
parentd6d389133409b315bc1b74752f58ef2647033bb9 (diff)
downloadsvg.js-ee0b340bfeb2430767d4a2850413f864c42e5405.tar.gz
svg.js-ee0b340bfeb2430767d4a2850413f864c42e5405.zip
add new default constructor (#714)
Diffstat (limited to 'src/text.js')
-rw-r--r--src/text.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/text.js b/src/text.js
index fa14894..bf37d60 100644
--- a/src/text.js
+++ b/src/text.js
@@ -1,7 +1,7 @@
SVG.Text = SVG.invent({
// Initialize node
- create: function() {
- this.constructor.call(this, SVG.create('text'))
+ create: function(node) {
+ this.constructor.call(this, node || SVG.create('text'))
this.dom.leading = new SVG.Number(1.3) // store leading value for rebuilding
this._rebuild = true // enable automatic updating of dy values