Resize node to same size

Hi GoJS expert,

We would like to resize two nodes to same size after they are linked to each other. We are currently changing the width and height directly.
We saw some strange sliding animation which bother user after we doing that. That cause the link shift in the process

The idea case would be both nodes resize without change the location like grow/shrink in same place.

Any better solution to do so?

Thank you!

I bet you have a Diagram.layout that is performed when any node has changed size. If that is the case, I suggest that you prevent the layout from happening again. Please read GoJS Layouts -- Northwoods Software.

If you still want layouts to be performed automatically when users or code adds or removes nodes or links, then you’ll want to set Node.layoutConditions just as shown in that Introduction page.

If you never want layouts to be performed again automatically, set Layout.isOngoing to false. You can still do layouts explicitly by calling Diagram.layoutDiagram.

@walter Thanks for pointing to that! We will try that.