Open KevinGutowski opened 5 years ago
Up for this one.
More context: in order to create a boolean group, we have to perform more actions:
let shapeGroup = new Shape({
frame: {
x: layer.frame.x,
y: layer.frame.y,
width: layer.frame.width,
height: layer.frame.height,
},
name: "Name",
parent: someParent,
layers: [],
});
shapeGroup
(based on selection or other lists) and apply the boolean option we need:
document.selectedLayers.layers.forEach((inner) => {
inner.parent = shapeGroup;
inner.sketchObject.setBooleanOperation(0);
});
where
0
= Union
1
= Substract
2
= Intersect
3
= Difference
-1
= None
Right now you have to drop down to the private api to do this