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

[doc] Add a shape on rectilinear custom edges #4647

Merged
merged 1 commit into from
Mar 6, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion CHANGELOG.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@

=== Shapes

- Add support for edges connected to edges
- Add support for edges connected to edges
- Preserve custom edges rectilinearity


=== Architectural decision records
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
= Force Custom Edges to Stay Rectilinear

== Problem

It is possible to add new bendpoints on an edge, but currently moving (or adding) a bendpoint causes the path to lose its rectilinearity.


== Key Result

Regardless of the actions performed on an edge, the resulting path must remain rectilinear.


=== Acceptance Criteria

Cypress tests will be implemented.


== Solution

On edge, bendpoint (black-filled circle) are positioned to each segment corner and intermediate point (grey circle) on middle to each segment.

image:images/custom-edges-point-types.png[Custom edges point types, 70%]

Modify the algorithm for moving a bendpoint so that two new bendpoints are created (for one axis) at the positions of the adjacent intermediate point of the moved bendpoint.

image:images/custom-edges-new-bendpoints-one-axis.png[New benbpoints on one axis, 70%]

The same approach could be applied on the two axis in the same drag.

image:images/custom-edges-new-bendpoints-two-axis.png[New bendpoints on two axis, 70%]

Change the behavior of intermediate points so that they do not create new bendpoints but instead move existing adjacent bendpoints along an axis (x or y).
This axis is perpendicular to the segment in question.

image:images/custom-edges-intermediate-point-translation.png[Intermediate point translation, 60%]

To delete a bendpoint, align two segments to form a single segment (a margin will be implemented to facilitate this action).

image:images/custom-edges-before-bendpoint-suppression.png[Before bendpoint suppression, 50%]

image:images/custom-edges-after-bendpoint-suppression.png[After bendpoint suppression, 50%]


== Cutting Backs

It would be interesting to define the routing of an edge (rectilinear, oblique, etc...).


== Rabbit Holes

* Node handles are currently fixed, so it's not possible to modify the first and last edge segments directly.
* When the node is moved, the first bendpoint must be updated to preserve rectilinearity of the edge path.

== No-Gos
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.