Prevent un-labelled edges that are left of the left-most vertex from … #1333
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
…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
develop
branch