Skip to content

Commit b4ff0d3

Browse files
committed
Optimize SVG import for clipped groups.
1 parent 7faf2a9 commit b4ff0d3

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

src/svg/SVGImport.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,12 @@ new function() {
345345
if (clip) {
346346
clip = clip.clone();
347347
clip.setClipMask(true);
348-
return new Group(clip, item);
348+
// If item is already a group, move the clip-path inside
349+
if (item instanceof Group) {
350+
item.insertChild(0, clip);
351+
} else {
352+
return new Group(clip, item);
353+
}
349354
}
350355
},
351356

0 commit comments

Comments
 (0)