mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-03 19:45:44 -05:00
Prevent double-application of styles when importing #document SVG nodes.
Closes #509.
This commit is contained in:
parent
53b00b40e1
commit
4e9fc558ac
1 changed files with 3 additions and 2 deletions
|
@ -595,8 +595,9 @@ new function() {
|
|||
item = importer && importer(node, type, options, isRoot) || null;
|
||||
settings.applyMatrix = prevApplyMatrix;
|
||||
if (item) {
|
||||
// See importGroup() for an explanation of this filtering:
|
||||
if (!(item instanceof Group))
|
||||
// Do not apply attributes if this is a #document node.
|
||||
// See importGroup() for an explanation of filtering for Group:
|
||||
if (type !== '#document' && !(item instanceof Group))
|
||||
item = applyAttributes(item, node, isRoot);
|
||||
// Support onImportItem callback, to provide mechanism to handle
|
||||
// special attributes (e.g. inkscape:transform-center)
|
||||
|
|
Loading…
Reference in a new issue