ls1intum / Apollon

UML Modeling Editor written in React
https://apollon-library.readthedocs.io
MIT License
65 stars 22 forks source link

`Development`: Add manual waypoints feature #253

Closed minrows closed 2 years ago

minrows commented 2 years ago

Checklist

Motivation and Context

This PR introduces new feature in Apollon. With this PR, users can add waypoints in connectors while drawing diagrams. Feature requested issue Number: https://github.com/ls1intum/Apollon/issues/93

Steps for Testing

In local machine:

  1. Clone the repo
  2. Checkout out feature/manual-waypoints branch
  3. Start application by executing yarn install followed by yarn start command
  4. Add and connect any elements in canvas
  5. Observe waypoints handles and drag to change them

In test server

Screenshots

screen-capture (21)

Additional Info

Changes released in 2.11.4-alpha.0

akesfeden commented 2 years ago

Tested on test server, in the screenshot below I can only see (and interact with) 2 connectors with waypoints, the others are not draggable. Is there a specific condition to create waypoints or all connectors should have them?

image

minrows commented 2 years ago

Tested on test server, in the screenshot below I can only see (and interact with) 2 connectors with waypoints, the others are not draggable. Is there a specific condition to create waypoints or all connectors should have them?

image

Ahh, that's intended @akesfeden. Manual layout handlers are only assigned when the line segments of connections (number of bents) are greater than 2. For other cases (less than 2), we do not allow the manual layouting as user can simply drag the elements instead of connectors.

akesfeden commented 2 years ago

I see, thanks for the explanation. In the case below, wouldn't it be nicer if we can also move the segments that are directly connecting to the elements? Maybe that can be considered as an enhancement.

image

minrows commented 2 years ago

I see, thanks for the explanation. In the case below, wouldn't it be nicer if we can also move the segments that are directly connecting to the elements? Maybe that can be considered as an enhancement.

image