From 5527ab1da802d111f7e4a94314a048103528e235 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrg=20Lehni?= Date: Fri, 1 Mar 2013 14:52:20 -0800 Subject: [PATCH] Support point translations for normals defs in SvgImport. --- src/svg/SvgImport.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/svg/SvgImport.js b/src/svg/SvgImport.js index 5c8882d6..da4363f1 100644 --- a/src/svg/SvgImport.js +++ b/src/svg/SvgImport.js @@ -202,14 +202,15 @@ new function() { // overflow: hidden. Paper.js currently does not suport PlacedSymbol // clipping, but perhaps it should? var id = (getValue(node, 'href') || '').substring(1), - definition = definitions[id]; + definition = definitions[id], + point = getPoint(node, 'x', 'y'); // Use place if we're dealing with a symbol: return definition ? definition instanceof Symbol // When placing symbols, we nee to take both point and // matrix into account. This just does the right thing: - ? definition.place(getPoint(node, 'x', 'y')) - : definition.clone() + ? definition.place(point) + : definition.clone().translate(point) : null; },