-
Notifications
You must be signed in to change notification settings - Fork 28
Display the smoothness slider correctly #2257
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
| e.stopPropagation() | ||
| } | ||
|
|
||
| for (const panel of Object.values(panels)) { |
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.
Similar blocks of code found in 2 locations. Consider refactoring.
| } | ||
|
|
||
| return () => { | ||
| for (const panel of Object.values(panels)) { |
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.
Similar blocks of code found in 2 locations. Consider refactoring.
|
Good fix, thanks @sroy3 . Can we control its color / position? Now it looks foreign a bit (clearly let's merge and ship this first). |
Color, it's possible. I simply added a background, but did not try changing the default of the slider. Position is a little harder. Adding the slider into the plot rectangle makes the plot really small. Like you mentioned, I was thinking we should iterate on this after merging the fix. |
|
|
| panel.removeEventListener('click', disableClick) | ||
| panel.addEventListener('mouseenter', addDisabled) | ||
| panel.addEventListener('mouseleave', removeDisabled) | ||
| panel.addEventListener('click', disableClick) |
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.
[Q] What is the reason for recreating these?
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.
Since vega-bindings is being created by vega and that the DragDropContainer rebuilds the plots, setting these events on re-render is the only way to hook on them. Doing so once would create them too early. Maybe I can set up an observer or something to add the listeners once the elements are ready. I'll look into it and do a follow up if possible.
|
Code Climate has analyzed commit bd48f10 and detected 0 issues on this pull request. The test coverage on the diff in this pull request is 100.0% (85% is the threshold). This pull request will bring the total coverage in the repository to 96.7% (0.0% change). View more on Code Climate. |

Closes #2248
Screen.Recording.2022-08-24.at.5.02.01.PM.mov
Try it yourself: https://5ffc93f46e9344002155f496-hvagdnhbph.chromatic.com/?path=/story/plots--smooth-template