Optimize SVG import for clipped groups.

This commit is contained in:
Jürg Lehni 2013-06-11 12:57:03 -07:00
parent 7faf2a9e70
commit b4ff0d347e

View file

@ -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);
}
}
},