mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-01 02:38:43 -05:00
Optimize SVG import for clipped groups.
This commit is contained in:
parent
7faf2a9e70
commit
b4ff0d347e
1 changed files with 6 additions and 1 deletions
|
@ -345,7 +345,12 @@ new function() {
|
|||
if (clip) {
|
||||
clip = clip.clone();
|
||||
clip.setClipMask(true);
|
||||
return new Group(clip, item);
|
||||
// If item is already a group, move the clip-path inside
|
||||
if (item instanceof Group) {
|
||||
item.insertChild(0, clip);
|
||||
} else {
|
||||
return new Group(clip, item);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
|
|
Loading…
Reference in a new issue