How can diagram layout itself only during the dragging and moving action?

When the layout.isOngoing is set to be “true”. Diagram layout is always be updated even I just click on a single node. Is there a way to layout the diagram only during I drag and move the selected nodes? Or is there a better timing for me to set the layout.isOngoing?

The default value of Layout.isOngoing is true, so you do not need to set it to be true.

It is a bit odd to want to do a layout just because the user is moving a node by dragging it, since the user’s moving a node usually means they want to move it where they want. So can you explain your situation a bit better, please?

The default value of Layout.isRealtime is true, so if dragging invalidates any layouts, the layouts happen again during the dragging operation.