Update positioning in lifecycle diagram #1090
Merged
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.
Closes #1077.
I've reworked the entire SVG but at first glance it should appear almost the same as it was before. I've nudged various things around by a pixel or two to try to make sizes and spacing a little more consistent but most of that won't be obvious unless you directly compare the old and new images. The file size is significantly smaller, though that wasn't a priority.
I've tested on Chrome, Firefox, Edge and Safari across a range of platforms and I'm not aware of any remaining problems or inconsistencies.
dominant-baseline
is probably the feature of most concern as it's a relatively new addition. While it does work fine in all of the browsers I tested, it didn't work in some non-browser image viewers I tried. This may cause the text to be positioned a few pixels too high. I don't expect this to be an issue in the docs.The more notable visual changes are:
when app.mount() is called
are now in slightly different places.Apart from the line breaks I haven't changed the wording.
Some technical notes on my changes. These may be of interest to anyone looking to edit the code in future:
stroke-dasharray
rather than drawing individual dashes.dominant-baseline
, so I've had to include that on every<text>
and<tspan>
element to achieve the correct vertical alignment,transform-origin
attribute. I originally used that for the 2 red, diagonal arrows as it made it easier to position them with an integer translation. Instead, I've used a few decimal places to get the desired positioning.