mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-03 19:45:44 -05:00
Support point translations for normals defs in SvgImport.
This commit is contained in:
parent
7553712e35
commit
5527ab1da8
1 changed files with 4 additions and 3 deletions
|
@ -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;
|
||||
},
|
||||
|
||||
|
|
Loading…
Reference in a new issue