eclipse-sprotty / sprotty

A diagramming framework for the web
https://sprotty.org/
Eclipse Public License 2.0
731 stars 83 forks source link

Moving multiple containers does not show feedback move of internal edge bendpoints #428

Closed paulreuter closed 8 months ago

paulreuter commented 9 months ago

This seems to occur when the edges are not connected directly to the moved elements, but rather to descendants of the moved elements.

Solving this problem probably requires two fixes:

In MoveCommand.execute, only edges attached to directly moved elements are found by index.getAttachedElements(element). Perhaps the definition of outgoing / incoming edges could be extended to include edges connected to descendants, but I haven't checked for side effects to that, or an additional index data structure is needed.

Later, in MoveCommand.doMove, there is a test whether both edge ends are included in the move:

               if (edge.source
                    && edge.target
                    && this.resolvedMoves.get(edge.source.id)
                    && this.resolvedMoves.get(edge.target.id))

That would require checking the descendant relation as well.