ls1intum / Apollon

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

Resolve #312 #324

Closed loreanvictor closed 7 months ago

loreanvictor commented 7 months ago

Checklist

Motivation and Context

See this issue.

Description

Although a translation factor was calculated based on position of relationship paths, boundaries of the SVG element itself, alongside positions of specific elements, where not updated accordingly. This PR fixes that.

Steps for Testing

  1. Create two elements, ideally with child elements.
  2. Connect them by the left (top) port.
  3. Drag the mid point of the relationship further to left (top).
  4. Export. On develop, this will yield a buggy export, while with this PR it won't.

Test Coverage

File Branch Line
main/scenes/svg.tsx 80% 81.15%

Screenshots

Sample diagram to reproduce the issue:

Screenshot 2023-11-20 at 01 00 58

How it will export on develop:

Screenshot 2023-11-20 at 01 00 48

How it will export after this PR:

Screenshot 2023-11-20 at 01 01 44