Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Epic: Relationship control points #10

Open
allantokuda opened this issue Dec 1, 2013 · 0 comments
Open

Epic: Relationship control points #10

allantokuda opened this issue Dec 1, 2013 · 0 comments

Comments

@allantokuda
Copy link
Owner

Need a way to add "control points" which are (x,y) coordinate pairs that control the path taken by a relationship. The relationship should then calculate its "best" path through its control points. The concept of "best" needs design effort to be fully defined for a variety of cases. The notes below are a first cut.

Needs:

  • Let the user create an L-shaped relationship, or even a zig-zag (S- or Z-shaped) relationship by adding points defining where the bends should be.
  • Let the user control where a reflexive relationship falls on an entity. A reflexive relationship is one that is connected to the same entity at both ends. Currently it always falls on the left side, or the top if the entity is made wide - and this is by accident. The user should be able to place the reflexive relationship on any side, at will.
  • Siblings (relationships that have the same pair of parent entities) need to stay parallel to each other along their entire path. Therefore, they should be controlled as a group by a single control point.

Initial suggestion for UI:

  • Make the relationships respond to a drag event. When dragged, a control point is added which displays as a faint gray circle whose diameter is the same as the arrowhead width.
  • The circle fades away when released.
  • The circle is red in the editor's delete mode, and can be deleted. Upon delete, the relationship snaps back to its best path without the control point.
  • As the point is dragged, the relationship updates in real time to pass through the point.
  • If a bend is not required, the relationship remains straight (horizontal/vertical).
  • If an L-shape is not possible (current S-shape scenarios), the path which is currently drawn as a diagonal line is instead drawn instead as two diagonal lines connected in the middle at the control point.
  • If an L-shape is possible, the relationship should take an L shape (90 degrees exactly).
  • An uncontrolled relationship should yield to a controlled relationship when their endpoints are in conflict. This means as the control point is dragged, another relationship may need to move out of the way.
  • A controlled relationship should yield to another controlled relationship of greater length. When the relationship currently being dragged is yielding to another relationship, the current relationship should stop following the mouse exactly, and instead fall at the closest point to the mouse possible. The control point circle should stay on the relationship, not the mouse.

Some scope considerations:

  • a solution that only is able to address reflexive relationships would still be an improvement.
  • initially limiting the user to one control point per relationship (L-shapes only) would still be a big improvement. But later, 2 or more will be desired to enable "zigzags", so a solution for this will be a plus.
  • it's OK to for this feature to initially be disabled on non-reflexive relationships that have siblings. It should be relatively rare for sibling relationships to need control points, as long as they are placed intelligently (separate issue).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant