-
Notifications
You must be signed in to change notification settings - Fork 168
Add measurements panel to SVG download #2005
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
Conversation
huddlej
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great, @joverlee521! I really like how the tree and measurements panel still retain their original widths from whichever layout the user had selected (full or grid). For cases when we want to recreate the grid view in Illustrator, this implementation detail should simplify that process by keeping the panel sizes at their original proportions.
Overall, the SVG export behaves exactly the way I would expect with the measurement panel outputs reflecting the settings and filters from the interactive Auspice view.
Thanks again for getting this implemented so quickly on such short notice!
jameshadfield
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @joverlee521 - everything works well except the grid mode (as commented)
| if (panelLayout === "grid") { | ||
| width = panels.tree.width + padding + panels.map.width; | ||
| height = Math.max(panels.tree.height, panels.map.height); | ||
| panels.map.x = panels.tree.width + padding; | ||
| } else { | ||
| width = Math.max(panels.tree.width, panels.map.width); | ||
| height = panels.tree.height + padding + panels.map.height; | ||
| panels.map.y = panels.tree.height + padding; | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In grid mode (with or without a map) the tree & measurements are half-width but on top of each other in the exported SVG. Note that if there are tree, map & measurements panels then the map is full width in grid mode, whereas I think some of these calculations are expecting the tree & map to be side-by-side?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This does mean the downloaded SVG in "Grid" display is not ideal since the tree and measurement panels have the smaller "Grid" widths while the other panels are all "full" panels.
🤦 I should have read the PR description better. Ok, this is fine!
Fix map panel layout when in the "Grid" display and the measurements panel is also displayed. Previously, the "full" map was added next to the "grid" tree in the downloaded SVG that was not ideal. This has bee an issue ever since the measurements panel was added because the measurements panel is prioritized over the map panel in the grid display.
Include measurements panel in the downloaded SVG, always displayed in the "full" mode so that all measurements hidden under the interactive scroll panel is displayed in the full height. This means the downloaded SVG does have a smaller "grid" tree panel that is not ideal, but I'm not wanting to pursue how to re-draw the tree for SVG downloads. Note that the graph and the x-axis are separate SVGs in the measurements panel to allow the sticky x-axis, so they are parsed separate for the SVG download.
c69c2e7 to
b358c4c
Compare
|
Rebased onto master & added changelog entry |
Description of proposed changes
community build in test app
Requested by @huddlej on Slack.
From discussion in person, we want all filtered measurements usually displayed in the scrolling panel as one long panel in the SVG. This does mean the downloaded SVG in "Grid" display is not ideal since the tree and measurement panels have the smaller "Grid" widths while the other panels are all "full" panels.
Checklist