sprotty icon indicating copy to clipboard operation
sprotty copied to clipboard

Cannot move single routing point with Manhattan routing

Open martin-fleck-at opened this issue 2 years ago • 0 comments

Investigating the bug reported in GLSP, I saw that there is a bug in the Manhattan routing that prevents moving the single routing point.

cannot-move-first-point (it can also be reproduced with the class diagram of Sprotty)

When moving the routing handles (which are placed between two routing points or the start/end point), we want to align the calculated route with the routing points present in the edge. However, if we only have start and end point, then the routing points array of the edge is empty preventing any update.

We can avoid the problem when we simply add a routing point to the edge if we try to move the routing handle. However, it is not very clear to me which routing points would be suitable as it very much depends on the start/end position calculation of the edge. If we simply were to use the target position then we would get something like this:

fix-move-first-point

But this does not behave like we would expect as you can see if I have already an arch between source and target then I get a much nicer move.

martin-fleck-at avatar Sep 09 '22 09:09 martin-fleck-at