diff options
author | Ulrich-Matthias Schäfer <ulima.ums@googlemail.com> | 2015-06-11 01:07:59 +0200 |
---|---|---|
committer | Ulrich-Matthias Schäfer <ulima.ums@googlemail.com> | 2015-06-11 01:07:59 +0200 |
commit | 843c0f5b0f7140c4d46d92293c2c18767d070f69 (patch) | |
tree | e123f0649d4ebe9bc6b37cd18da8aca4ab38142c /src/use.js | |
parent | d5f5dd18a6c9d986dd0582256e2120675e1ca561 (diff) | |
download | svg.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-x | src/use.js | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -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 |