Skip to content

When we change the layout of the diagram, draw.io fails to change the connection points of edges, which requires manual effort #5640

Description

@raindropsfromsky

Preflight Checklist

  • I agree to follow the Code of Conduct that this project adheres to.
  • I have searched the issue tracker for a feature request that matches the one I want to file, without success.

You must search the issue tracker and agree to the code of conduct. You must fill in this entire template. If you delete part/all or miss parts out your issue will be closed.

If you are technical, you should report bugs along the lines of https://marker.io/blog/how-to-write-bug-report. If you are not technical, we will make allowances, please try to make an effort to understand the process.

Describe the bug
dra.io has a major bug: When I change the layout, all nodes are rearranged according to the new layout. But the app fails to switch the connection points of all nodes so that the edges can be re-routed properly toward the new direction.

To Reproduce
Steps to reproduce the behavior:

  1. Create a simple TD diagram, as shown:
Image

Note that this sample chart was generated in AI, and it uses simple connectors.
(In other words, I have NOT anchored the edges to special glue points.)

  1. Change the layout to horizontal.
    In my theme, I click on the (+) button, and select Layout > Horizontal flow.

The app converts the diagram to this:
Image

This is terrible! I have to drag the start and end points of all edges manually.
If this is a large diagram, the task is too tedious.


Example-2:
Here, I have changed the edge type to "Horizontal", and manually dragged all connection points to North/South.
Image

After changing the layout to Horizontal, the result is even worse:
Image

Notice that the edges are no longer horizontal, and they look like squashed spiders.
In this example, I have to change the edge type also, apart from dragging the start+end points.

Expected behavior
Draw.io should automatically move the connection points of all edges toward the entry/exit direction (in this case, East-West).

It should automatically reset the edge types and also glue points.
(Both these attributes are for beautification of the graph, and not essential while we change the layout. Therefore, the original settings are irrelevant.)

Screenshots
(provided above)

draw.io version (In the Help->About menu of the draw.io editor):
v30.0.0 (Desktop version)

Desktop (please complete the following information):
Windows 11

Smartphone (please complete the following information):
N/A

I tested the problem in incognito/private mode with all browser extensions switched off, write "yes" below:
N/A

Additional context
Increasingly, users will copy Mermaid code from the AI engines and paste it in the draw.io to optimize/edit the diagram. In such case, they will invariably land in this trouble.

Therefore this solution is direly needed.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions