I spoke with the developer, and it turns out that this is already supported because the layout.stack
property is optional. So to set the group’s layout to a horizontal stack without specifying spacings
:
let layoutStack = { type: SceneNode.LAYOUT_STACK }; // Defaults to horizontal
selectedGroup.layout = layoutStack;
To set the group’s layout to a vertical stack without specifying spacings
, modify the existing layout property twice:
let layoutProperties = selectedGroup.layout;
layoutProperties.type = SceneNode.LAYOUT_STACK;
selectedGroup.layout = layoutProperties;
layoutProperties = selectedGroup.layout;
layoutProperties.stack.orientation = SceneNode.STACK_VERTICAL;
selectedGroup.layout = layoutProperties;
I hope this resolves your issue.