Hi Jan,
On analyzing the sample you have added new node to the group node container as diagram element. By default, in the diagram nodes only respect the offset values, for diagram element we does not give offset support. By using margin property we can add margin for the node. So for adding new node to the group node container set margin to the node. If you set margin top, left as 100, 100 new node renders with margin top , left as 100, 100. Please find the below code snippet for how to set margin for diagram element.
const a = {id: uuidv4(), offsetX: 350, offsetY:350, height: 50, width: 50, container: { type: "Canvas", orientation: "Horizontal" },
margin: {left: 50, top: 50, right: 0, bottom: 0 }} as unknown as DiagramElement; |
Please refer below screen shot
Regards
Aravind Ravi