aboutsummaryrefslogtreecommitdiffstats
path: root/src/text.js
diff options
context:
space:
mode:
authorUlrich-Matthias Schäfer <ulima.ums@googlemail.com>2016-03-23 22:50:58 +0100
committerUlrich-Matthias Schäfer <ulima.ums@googlemail.com>2016-03-23 22:50:58 +0100
commit41e6dce08645309434a81871908899b8c3b9dff8 (patch)
tree793b01f8646296d0e40fe95fc16f9bbec93e763f /src/text.js
parent8205de6087bd6fe48706f598c49a111f52740c97 (diff)
downloadsvg.js-41e6dce08645309434a81871908899b8c3b9dff8.tar.gz
svg.js-41e6dce08645309434a81871908899b8c3b9dff8.zip
fix lines function for textpath and make textpath a parent element
Diffstat (limited to 'src/text.js')
-rw-r--r--src/text.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/text.js b/src/text.js
index debc1fb..6dd4dee 100644
--- a/src/text.js
+++ b/src/text.js
@@ -112,8 +112,10 @@ SVG.Text = SVG.invent({
}
// Get all the first level lines
, lines: function() {
+ var node = (this.textPath && this.textPath() || this).node
+
// filter tspans and map them to SVG.js instances
- var lines = SVG.utils.map(SVG.utils.filterSVGElements(this.node.childNodes), function(el){
+ var lines = SVG.utils.map(SVG.utils.filterSVGElements(node.childNodes), function(el){
return SVG.adopt(el)
})