Grouping
To group multiple elements so they can be selected and moved as a single unit, assign them the exact same groupIds array.
Example: groupIds: ["auth-group"].
Framing
To organize large areas (like architectural layers), use a frame element.
- Create an element with
type: "frame" and give it an id and a name. - For every element you want inside that frame, set its
frameId property to the frame's id.
[
{
"id": "data-layer-frame",
"type": "frame",
"x": 50,
"y": 400,
"width": 600,
"height": 300,
"name": "数据存储层"
},
{
"id": "postgres-db",
"type": "rectangle",
"frameId": "data-layer-frame",
"x": 75,
"y": 480
}
]