mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-06 04:42:15 -05:00
SVG Importer: Add support for 'use' element.
This commit is contained in:
parent
c704d285f2
commit
9e00a6282f
1 changed files with 5 additions and 0 deletions
|
@ -214,6 +214,11 @@ new function() {
|
||||||
|
|
||||||
// http://www.w3.org/TR/SVG/struct.html#DefsElement
|
// http://www.w3.org/TR/SVG/struct.html#DefsElement
|
||||||
defs: importGroup,
|
defs: importGroup,
|
||||||
|
|
||||||
|
// http://www.w3.org/TR/SVG/struct.html#UseElement
|
||||||
|
use: function(svg, type) {
|
||||||
|
var id = svg.getAttribute('xlink:href').substr(1);
|
||||||
|
return definitions[id].clone();
|
||||||
},
|
},
|
||||||
|
|
||||||
// http://www.w3.org/TR/SVG/shapes.html#InterfaceSVGCircleElement
|
// http://www.w3.org/TR/SVG/shapes.html#InterfaceSVGCircleElement
|
||||||
|
|
Loading…
Reference in a new issue