diff options
author | wout <wout@impinc.co.uk> | 2013-06-09 11:37:26 +0100 |
---|---|---|
committer | wout <wout@impinc.co.uk> | 2013-06-09 11:37:26 +0100 |
commit | 8f03d84e43681ecca20ac028071e51a2e2bbc0c8 (patch) | |
tree | f5c11dc6c429e8459c20731ba775fa6ca794400f /src/text.js | |
parent | ec75128ec31aa055aca2ae7f95ad4f5cf38d12e0 (diff) | |
download | svg.js-8f03d84e43681ecca20ac028071e51a2e2bbc0c8.tar.gz svg.js-8f03d84e43681ecca20ac028071e51a2e2bbc0c8.zip |
Added deep traversing, reorganizd modules
Diffstat (limited to 'src/text.js')
-rw-r--r-- | src/text.js | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/text.js b/src/text.js index afd8724..22ec5bc 100644 --- a/src/text.js +++ b/src/text.js @@ -19,6 +19,7 @@ SVG.Text = function() { // Inherit from SVG.Element SVG.Text.prototype = new SVG.Shape +// SVG.extend(SVG.Text, { // Move over x-axis x: function(x, a) { @@ -123,6 +124,15 @@ SVG.extend(SVG.Text, { }) +// +SVG.extend(SVG.Container, { + // Create text element + text: function(text) { + return this.put(new SVG.Text().text(text)) + } + +}) + // tspan class SVG.TSpan = function() { this.constructor.call(this, SVG.create('tspan')) |