We are using bpmn sub-process group,
when we move any shape at the edge of the sub-process, it stays like this it doesn’t auto layout,
we haven’t used placeholder as we wanted to make the sub process resizable, but both things are not achievable at this movement.
Our motive: we wanted the sub process to be resizable as well as auto layout whenever we move a shape at the edge of the sub-process
I have attached the sub-process code below
return $(
go.Group,
"Auto",
new go.Binding("location", "location"),
{
defaultAlignment: go.Spot.Top,
resizable: true,
resizeObjectName: "BODY",
selectionObjectName: "BODY",
locationObjectName: "BODY",
contextMenu: contextMenuRef.myContextMenu,
mouseDrop: (e, group) => {
if (!(group instanceof go.Group)) {
return;
}
group.addMembers(e.diagram.selection, true);
},
},
$(go.Panel, "Auto", {},
$(
go.Shape,
"RoundedRectangle",
{
parameter1: 10,
fill: "#FCF3D3",
stroke: "#828190",
strokeWidth: 2,
}),
),
$(
go.Panel,
"Vertical",
{
defaultAlignment: go.Spot.TopCenter,
},
$(
go.Panel,
"Horizontal",
{ defaultAlignment: go.Spot.TopCenter, },
$(
go.TextBlock,
{
font: "14px Sans-Serif",
margin: new go.Margin(6),
editable: true,
textAlign: "center",
},
new go.Binding("text", "text").makeTwoWay()
)
),
$(
go.Shape,
"Placeholder",
{
name: "BODY",
fill: "#fff",
minSize: new go.Size(300, 150),
stretch: go.GraphObject.Horizontal,
},
new go.Binding("visible", "isSubGraphExpanded", function (e) {
return e;
}).ofObject()
),
),
);
};
}