diff options
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')) |