aboutsummaryrefslogtreecommitdiffstats
path: root/src/use.js
diff options
context:
space:
mode:
authorUlrich-Matthias Schäfer <ulima.ums@googlemail.com>2015-06-11 01:07:59 +0200
committerUlrich-Matthias Schäfer <ulima.ums@googlemail.com>2015-06-11 01:07:59 +0200
commit843c0f5b0f7140c4d46d92293c2c18767d070f69 (patch)
treee123f0649d4ebe9bc6b37cd18da8aca4ab38142c /src/use.js
parentd5f5dd18a6c9d986dd0582256e2120675e1ca561 (diff)
downloadsvg.js-843c0f5b0f7140c4d46d92293c2c18767d070f69.tar.gz
svg.js-843c0f5b0f7140c4d46d92293c2c18767d070f69.zip
Merged all changes and fixes from SVG 1.1 into this branch
Diffstat (limited to 'src/use.js')
-rwxr-xr-xsrc/use.js12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/use.js b/src/use.js
index ddad76c..1fe7cb3 100755
--- a/src/use.js
+++ b/src/use.js
@@ -8,20 +8,20 @@ SVG.Use = SVG.invent({
// Add class methods
, extend: {
// Use element as a reference
- element: function(element) {
- // Store target element
+ element: function(element, file) {
+ /* Store target element */
this.target = element
- // Set lined element
- return this.attr('href', '#' + element, SVG.xlink)
+ /* Set lined element */
+ return this.attr('href', (file || '') + '#' + element, SVG.xlink)
}
}
// Add parent method
, construct: {
// Create a use element
- use: function(element) {
- return this.put(new SVG.Use).element(element)
+ use: function(element, file) {
+ return this.put(new SVG.Use).element(element, file)
}
}
}) \ No newline at end of file