When undoManager.isEnabled = true, nodes and groups don't shift smoothly?

When undoManager.isEnabled = true, nodes and groups don’t shift smoothly.
When I click on a button to expand/collapse a group, the expand occurs smoothly, with other nodes shifting out of the way, but the collapse is instantaneous. If other nodes on the diagram have been moved by the user since then, they will pop immediately back into where the TreeLayout wants them.

Is there a way to have undoManager.isEnabled = true, but still keep the smooth animations?

(Sidenote: When undoManager.isEnabled = false, these problems do not occur, but my ChangedEvent listeners also no longer work. Is this intended?)

Can you show me an example in a codepen of this happening?

Hi Simon, thanks for the speedy reply.
I’ve modified your codepen to recreate my problems.

If you move a node like Delta, and click on the SubGraphExpanderButton on Alpha, animations will occur. Move Delta again, and collapse the subgraph, and Delta will “pop” into place.
Click on the edges of the nodes to trigger my remove function. My ChangedListener will print to console on change of nodeDataArray.

Comment out undoManater.isEnabled and animations will be smooth, whether you collapse or expand the subgroup. However, clicking on the edges to delete a node will fail to print to console.

It doesn’t have to be expanding/collapsing the subgraph. You can select a node and delete it, and the diagram will “pop” into place. The layout can be a different layout, and the same effect is present.

I see what you mean.

This animation is “fixed” in the GoJS 1.6 beta. This is your codepen but pointing to GoJS - Build Interactive Diagrams for the Web instead of /latest.

We cannot fix this animation in 1.5, unfortunately, because its not exactly a bug, even though it doesn’t look great. In 1.5 only group expansion is animated, and in 1.6 both expand and collapse are animated.

Feel free to use the beta, for either testing or production. We release updates and fixes as often as need, as always.

Oh okay, thanks!
It seems to fix the node deletion “pop” effect as well. I can collapse Alpha node, and any other nodes that have been moved will have their shift animated.

However, if you move the Alpha node and then collapse it, it animates the collapsing, but afterwards, it will “pop” the group node to where the layout wants it to be, even if undoManager is disabled (I guess popping is no longer linked to undoManager!)

Will that be fixed/updated/looked into?

Well that’s definitely a bug you’re seeing, but thankfully it is already fixed in our local builds and will be out with the next Beta release, probably in a few days.