From 9e00a6282fb8e63a559c40e803323b59f26ff351 Mon Sep 17 00:00:00 2001 From: Jonathan Puckey Date: Wed, 7 Nov 2012 17:21:35 +0100 Subject: [PATCH] SVG Importer: Add support for 'use' element. --- src/svg/SvgImport.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/svg/SvgImport.js b/src/svg/SvgImport.js index 61252ba9..e41517e4 100644 --- a/src/svg/SvgImport.js +++ b/src/svg/SvgImport.js @@ -214,6 +214,11 @@ new function() { // http://www.w3.org/TR/SVG/struct.html#DefsElement 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