LayeredDigraphLayout custom Crossing Reduction algorithm?

GoJS Question

I’d like to use the LayeredDigraphLayout but enforce a sorting order of nodes in each layer. Essentially using the Sugiyama-style algorithms, but skip the Crossing Reduction step.

I seem to be able to accomplish this on the initial layout by setting LayeredDigraphLayout {iterations: 0, aggressiveOption: AggressiveNone}.

The problem is that the order is only implicit, defined by the array order of the nodes the first time the graph is laid out. I’d like to be able to change the order and animate the layout change. Similar to what can be done with TreeLayout custom sorting and comparer.

Is there a way to do this with the LayeredDigraphLayout?

Perhaps by opting out of layout caching? I notice I can get the layout I want by reinitializing the LayeredDigraphLayout diagram. But this breaks the animation and other diagram state.

Or better, a way to extend the LayeredDigraphLayout and replace the Crossing Reduction algorithm with a simple sorting algorithm?

Example CodeSandbox: Tree vs Layered Graph Sorting - CodeSandbox

Swapping vertex b and c order. Tree can be animated. Layered requires diagram reinitialization:

Override the undocumented LayeredDigraphLayout.reduceCrossings method to be a no-op:

    . . . // property settings
    reduceCrossings: function() {}