Not sure what to reference here, but I know there’s something in the API that I can use to prevent artboards from overlapping another artboard when it’s added to the document?
editDocument({ editLabel: "add artboard" }, (selection, documentRoot) => {
let newArtboard = new Artboard();
newArtboard.height = JSON.parse(height);
newArtboard.width = JSON.parse(width);
newArtboard.fill = new Color("#ffffff");
newArtboard.name = name +' '+ newArtboard.width +'X'+ newArtboard.height;
documentRoot.addChild(newArtboard);
});
Right now I’m just using .addChild() but is there something else that I can use to ensure the artboards aren’t overlapping another artboard when they’re added to the document?
Thanks in advanced,
Kenny