From f92e842644197d9687dd2f961007a8ce1870eb17 Mon Sep 17 00:00:00 2001 From: Jonathan Puckey Date: Thu, 8 Nov 2012 17:22:32 +0100 Subject: [PATCH] SVG Importer: more work on Symbol importing. --- src/svg/SvgImport.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/svg/SvgImport.js b/src/svg/SvgImport.js index 8ac4b7c8..befeb060 100644 --- a/src/svg/SvgImport.js +++ b/src/svg/SvgImport.js @@ -84,7 +84,7 @@ new function() { if (compound && item instanceof CompoundPath) { group.addChildren(item.removeChildren()); item.remove(); - } else { + } else if (!(item instanceof Symbol)) { group.addChild(item); } } @@ -421,7 +421,10 @@ new function() { item.setRampPoint(isPercentage ? value / 100 : value); break; case 'xlink:href': - item = definitions[value.substr(1)].clone(); + var definition = definitions[value.substr(1)]; + // Use place if we're dealing with a symbol: + item = definition.place ? definition.place() : definition.clone(); + break; default: // Not supported yet. break;