summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/bare.js5
-rw-r--r--src/symbol.js14
2 files changed, 14 insertions, 5 deletions
diff --git a/src/bare.js b/src/bare.js
index a045165..f8deea4 100644
--- a/src/bare.js
+++ b/src/bare.js
@@ -37,9 +37,4 @@ SVG.extend(SVG.Parent, {
element: function(element, inherit) {
return this.put(new SVG.Bare(element, inherit))
}
- // Add symbol element
-, symbol: function() {
- return this.defs().element('symbol', SVG.Container)
- }
-
}) \ No newline at end of file
diff --git a/src/symbol.js b/src/symbol.js
new file mode 100644
index 0000000..e7baf53
--- /dev/null
+++ b/src/symbol.js
@@ -0,0 +1,14 @@
+SVG.Symbol = SVG.invent({
+ // Initialize node
+ create: 'symbol'
+
+ // Inherit from
+, inherit: SVG.Container
+
+, construct: {
+ // create symbol
+ symbol: function() {
+ return this.put(new SVG.Symbol)
+ }
+ }
+}) \ No newline at end of file