summaryrefslogtreecommitdiffstats
path: root/src/Tspan.js
diff options
context:
space:
mode:
authorUlrich-Matthias Schäfer <ulima.ums@googlemail.com>2018-10-27 22:43:30 +0200
committerUlrich-Matthias Schäfer <ulima.ums@googlemail.com>2018-10-27 22:43:30 +0200
commita612dc0dd5b911728a7089900138727f1eec549e (patch)
treea5c6864b20d9f862a51e09a62b1e8775284ac5a1 /src/Tspan.js
parent1c75fcaf02ceb144152d59557643c6fdd7264065 (diff)
downloadsvg.js-a612dc0dd5b911728a7089900138727f1eec549e.tar.gz
svg.js-a612dc0dd5b911728a7089900138727f1eec549e.zip
resolve last circular dependencies, make rollup work
Diffstat (limited to 'src/Tspan.js')
-rw-r--r--src/Tspan.js18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/Tspan.js b/src/Tspan.js
index f5030c9..811c4b1 100644
--- a/src/Tspan.js
+++ b/src/Tspan.js
@@ -41,3 +41,21 @@ export default class Tspan extends Base {
}
extend(Tspan, textable)
+
+Tspan.constructors = {
+ Tspan: {
+ tspan (text) {
+ var tspan = new Tspan()
+
+ // clear if build mode is disabled
+ if (!this._build) {
+ this.clear()
+ }
+
+ // add new tspan
+ this.node.appendChild(tspan.node)
+
+ return tspan.text(text)
+ }
+ }
+}