From 8f03d84e43681ecca20ac028071e51a2e2bbc0c8 Mon Sep 17 00:00:00 2001 From: wout Date: Sun, 9 Jun 2013 11:37:26 +0100 Subject: Added deep traversing, reorganizd modules --- src/text.js | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/text.js') 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')) -- cgit v1.2.3