aboutsummaryrefslogtreecommitdiffstats
path: root/src/use.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/use.js')
-rw-r--r--src/use.js21
1 files changed, 11 insertions, 10 deletions
diff --git a/src/use.js b/src/use.js
index 96f7411..2b8e65e 100644
--- a/src/use.js
+++ b/src/use.js
@@ -1,24 +1,25 @@
+
SVG.Use = SVG.invent({
// Initialize node
- create: 'use'
+ create: 'use',
// Inherit from
-, inherit: SVG.Shape
+ inherit: SVG.Shape,
// Add class methods
-, extend: {
+ extend: {
// Use element as a reference
- element: function(element, file) {
- // Set lined element
+ element: function (element, file) {
+ // Set lined element
return this.attr('href', (file || '') + '#' + element, SVG.xlink)
}
- }
-
+ },
+
// Add parent method
-, construct: {
+ construct: {
// Create a use element
- use: function(element, file) {
- return this.put(new SVG.Use).element(element, file)
+ use: function (element, file) {
+ return this.put(new SVG.Use()).element(element, file)
}
}
})