Bug 518226 - User intuitive orthogonal routing algorithm
Summary: User intuitive orthogonal routing algorithm
Status: NEW
Alias: None
Product: GEF
Classification: Tools
Component: GEF MVC (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 10
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: gef-inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: greatbug
Depends on:
Blocks:
 
Reported: 2017-06-14 05:31 EDT by Victor Johnsson CLA
Modified: 2018-10-15 14:16 EDT (History)
2 users (show)

See Also:


Attachments
current behavior (168.13 KB, image/gif)
2017-06-14 05:31 EDT, Victor Johnsson CLA
no flags Details
suggested behavior (123.60 KB, image/gif)
2017-06-14 05:32 EDT, Victor Johnsson CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Victor Johnsson CLA 2017-06-14 05:31:50 EDT
Created attachment 268898 [details]
current behavior

This is more of a suggestion for how orthogonal routing should work in the GEF logo example than an actual bug. Consider the use case when a user wants to connect two elements with a orthogonal connection. The steps to do it with the GEF logo example is the following:

1. Create a connection from some element by hovering over it and pressing the plus sign.
2. Drag the connection end point to the other element
3. Change the routing stype to orthogonal

But if there are obstacles on the way to the other element, as shown in the example gif with the description 'current behavior', the intuitive way for the user to avoid those would be to drag the end point. However, with the current implementation this is not possible.

A suggested change would be to have orthogonal routing work as shown in the other example gif with the description 'suggested behavior'. With this behavior the user have greater control over waypoint creation when dragging the endpoint.
Comment 1 Victor Johnsson CLA 2017-06-14 05:32:24 EDT
Created attachment 268899 [details]
suggested behavior
Comment 2 Matthias Wienand CLA 2017-06-16 11:47:59 EDT
I like the idea. An explicit way point could be added when starting to manipulate a free end point. Currently, anchors are only made explicit when the user interacts with a corresponding segment, so that the route changes by default when an anchorage changes position.

1) Orthogonal connection from A to the free end point X, no explicit way points:

   A---+
       |
       |
       +---X

2) Drag X up to match A's vertical position:

   a) Current behavior:

   A-------X

   b) Suggested behavior:

   A---+   X
       |   |
       |   |
       +---+

   Then, we need to define how to behave when moving A down to match X's old vertical position:

           X
           |
           |
   A-------+

vs.

   +---+   X
   |   |   |
   |   |   |
   A   +---+

   The intermediate way points could be removed, because only X's position was made explicit, or all way points could be made explicit, so that they remain when moving A.

Possibly, the behavior could be configurable, for example, via an ExplicitationStrategy that is used by BendConnectionPolicy, or ExplicitationSupport that is used by the handlers, or similar.

For the default behavior, we should decide:

1) If an explicit way point is inserted for a free end point when starting to manipulate it.

2) If implicit way points are made explicit when committing a manipulation.

What do you think?
Comment 3 Victor Johnsson CLA 2017-06-19 03:17:44 EDT
I prefer the alternative which is

   A---+   X
       |   |
       |   |
       +---+

   to

           X
           |
           |
   A-------+

The reasoning for using this alternative would be that when the user moves A, the user is simply concerned with the position of A and not with creating waypoints. Then the user would not want the tool to add what seems to be unnecessary waypoints. In the other alternative, if there are many connections attached to A, when moving A around the connections would lump together. This would probably also be undesirable since it makes it difficult to distinguish individual connections.

About the decision when to insert an explicit waypoint, does inserting an explicit waypoint mean changing the model? If so I like the idea that the model is only changed when the user is done with an action (mouse release, commit). Also I think we want to make sure that when moving X to the target t:
 
   A---+
       |   t
       |
       +--------X

this is the way it bends:

   A---+
       |   X
       |   |
       +----

and not:

   A---+
       |   X----+
       |        |
       +--------+