Once all of the “existing” nodes have been created, you can call Diagram.findPartsIn to find out whether there are any Parts within or perhaps partially overlapping a given Rect area.
Perhaps you want to do that in a custom Layout.
Once all of the “existing” nodes have been created, you can call Diagram.findPartsIn to find out whether there are any Parts within or perhaps partially overlapping a given Rect area.
Perhaps you want to do that in a custom Layout.
Once the existing nodes have been created. Can we not directly use, diagram.model.addNodeData and diagram.model.addLinkData?? Would these disturb the existing nodes positions?
Models are independent of layouts. Although as you have found, adding or removing a node or a link will normally invalidate the current layout. So, yes, you can and should continue to use model methods for manipulating the model.
Whether existing nodes are “disturbed” depends on the layout.