Fix toSVG
for graphs that call Drawing.gradient
#2914
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.
This PR fixes
toSVG
(and hencetoImage
anddownloadImage
) for graphs with filled colorbars (from #2910) and contour legend items (added in #2891) in "newer" browsers.These bugs are related to double-nested
"
inside svg nodestyle
- which browsers have a hard time serializing (cc #1697). Why were they unnoticed in their respective PRs: our old nw.js image-server doesn't care about those double-nested"
.What saved us from releasing these bugs in 1.40.0 is
./tasks/noci_test.sh
which test mapbox and cone mocks using orca (which relies on a much newer version of Chromium) where the mocks with colorbars failed to export.Now, this PR offers two solutions:
The second solution seems to work well, and it leads to 🔪 a fairly big hacky block in
toSVG
. Thoughts?