-
Notifications
You must be signed in to change notification settings - Fork 295
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
Svg update #1350
Svg update #1350
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1350 +/- ##
==========================================
- Coverage 94.30% 94.17% -0.14%
==========================================
Files 26 26
Lines 5584 5594 +10
Branches 954 958 +4
==========================================
+ Hits 5266 5268 +2
- Misses 187 194 +7
- Partials 131 132 +1
... and 3 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
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, LGTM. I assume that the black border in the "after" picture is some artifact not coming from CQ.
Correct. I must have gotten part of the frame of the app when I did the screenshot. |
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.
I'd like to propose the following changes:
-
Explicitly choose to recompute width or height.
-
With the current PR the user does not know ahead of time which dimension will be recomputed.
I get surprised to find either one of width/height changed.
-
It is more straightforward to specify a fixed width or height. The user will likely have one in mind and does not need to specify both since the other is recomputed.
I can then say I want a width of 200 pixels and the height fits automatically.
-
-
The current PR handling of margin is inconsistent with fitView=False. I suggest to respect the width or height value given - do not change it according to margin (margin padded to inside of width and height).
Please see these changes here:
lorenzncode@6aab3be
The fitView option was removed. Instead, you can fit by specifying -1 for one of the dimensions.
This results in a width of 200, height is computed:
width = 200
height = -1
This results in a height of 100, width is computed:
width = -1
height = 100
@lorenzncode I've made those changes (except for the test changes), but I'm not convinced that using |
None sounds more pythonic |
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.
Looks good, thanks @jmwright!
@adam-urbanczyk It looks like AppVeyor is grabbing the OCP 7.7.1 pre-release and it might be breaking the builds.
|
Should be solved, I moved 7.7.1 to dev |
Hm, not quite. Seems that 7.7.1 is available from the conda-forge channel even though the PR is not merged. |
PRs #1277 and #1325 are both open with SVG export changes, but neither one fixed this issue for me. There was an extra bottom-right margin that I could not remove in the resulting SVG, and I wanted my SVGs to fill the image edge to edge for my use case while still respecting the top/left margins. These changes accomplish that.
Below are before and after examples.
Before:
After: