Hi,
LayeredDigraphLayout is a good fit for a diagram I am currently working on. One requirement I need to meet is handling expansion of a node (when it is a group). It has to stay in the same “layer”, centered, while other “layers” appropriately move away and order of nodes there is not changing.
For testing I just submit size change for a single node like:
myDiagram.model.setDataProperty(nodeModelObject, “size”, newSize);
LayeredDigraphLayout does most of it, but may reorganize node sequence in any “layer” as it finds appropriate. This behavior I want to avoid by extending this layout.
While debugging my custom code I found that original layout always goes through doLayout -> makeNetwork -> createNetwork -> assignLayers -> updateParts -> commitLayout -> commitNodes -> commitLayers process flow, does not reuse previously calculated network/vertexes. I can preserve initially created network, modify vertexes which belong to a particular “layer” and in custom doLayout method assign: this.network = initialNetwork; then call updateParts(). But this way I do not get properly realigned links.
What would be your suggestion for customization of this layout?
BTW, I have one more requirement related to handling individual “layers”: if user drops a new node in a “layer”, existing nodes below it should move down (assuming left-to-right direction of diagram) leaving space for new member.