diff options
Diffstat (limited to 'src/text.js')
-rw-r--r-- | src/text.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/text.js b/src/text.js index 38d4ecc..911b31b 100644 --- a/src/text.js +++ b/src/text.js @@ -1,4 +1,3 @@ - SVG.Text = SVG.invent({ // Initialize node create: function() { @@ -142,6 +141,8 @@ SVG.TSpan = SVG.invent({ , extend: { // Set text content text: function(text) { + if(text == null) return this.node.textContent + (this.dom.newLined ? '\n' : '') + typeof text === 'function' ? text.call(this, this) : this.plain(text) return this |