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

Prevent un-labelled edges that are left of the left-most vertex from … #1333

Merged
merged 1 commit into from
Apr 4, 2020

Conversation

spopida
Copy link
Member

@spopida spopida commented Apr 2, 2020

…being cut off the diagram

📑 Summary

Fix viewBox mapping to svg viewport to prevent left-most edges being sliced off in some cases

Resolves #1327

📏 Design Decisions

A change to the way the viewBox is defined in flowRenderer.js. It now uses svgBounds.x and svgBounds.y to determine its minimum x and y values respectively (with an adjustment for padding around the diagram). This is instead of using (0,0), because it is possible for unlabelled edges to have negative co-ordinates which meant that they got 'sliced' off. The viewBox now correctly maps onto the svg viewport even if the latter has negative minima.

Also, a new integration test has been added to include an example equivalent to that provided by the bug reporter so that this case is included in regression tests.

📋 Tasks

Make sure you

  • 📖 have read the contribution guidelines
  • 💻 have added unit/e2e tests (if appropriate)
  • 🔖 targeted develop branch

@GDFaber GDFaber self-requested a review April 2, 2020 15:10
@jgreywolf
Copy link
Contributor

Minor comment - this same thing needs to be done for ClassDiagrams as well. I wont be able to do anything here until late next week, so if you feel ambitious.. :)

@spopida
Copy link
Member Author

spopida commented Apr 3, 2020

@jgreywolf - I'll try to take a look in the next couple of days... :-)

@GDFaber
Copy link
Member

GDFaber commented Apr 4, 2020

Awesome, thanks for fixing this.

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

Successfully merging this pull request may close these issues.

Diagram rendering is cut
3 participants