-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Fix issue #384 (invisible legends when y is negative) #417
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
Fix issue #384 (invisible legends when y is negative) #417
Conversation
* Commented out the statements to round off the legend location, in order to reproduce the baseline images.
ly -= opts.height / 2; | ||
} | ||
|
||
//lx = Math.round(lx); | ||
//ly = Math.round(ly); | ||
|
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've commented out these two lines only to reproduce the baseline images, but I think they should be brought back.
This looks pretty good so far - could you elaborate on the commented out I'm going to continue testing to see if there's any issues but I haven't found anything yet. |
The baseline images have been generated using When Before introducing scrollbars, |
|
699b496
to
ab15b52
Compare
ab15b52
to
8baac47
Compare
Commit 8baac47 adds a nice tweak to legends. Previously, the margins were expanded using the legend size, no matter whether the legend would fit or not. But since legends that don't fit are forced to fit into the plot height, there is no need to expand the vertical margin and make the plot box unnecessarily smaller. |
* Now drag events make the scrollbar follow the mouse position. * Now wheel events move the scrollbar position as fast as drag events.
151b29d
to
c96581c
Compare
d8e8c38
to
e1effce
Compare
Looks great! Let's either remove these entirely or uncomment them (it seems like they may not be necessary?), then 💃 and we can merge it in! |
@mdtusz Done. I have a commit that splits While playing with the scrollbar I noticed that the top and bottom traces in the legend may overlap with the legend border. I've thought of two possible solutions:
Option 2 involves less coding (but adds one more layer). Which option do you prefer? |
I'd prefer to keep the layers as minimal as we can - can we just alter the clippath to be "padded" - i.e. reduce it's height by x pixels and translate down by x/2 pixels? Or perhaps I'm misunderstanding the issue. |
Ah ok got it. I'd prefer if we went with option 1, but I'll leave it to your judgement. |
Thanks Nico. This looks good to go. 💃 |
This a new solution to fix #384 that only touches
Legend.draw()