-
Notifications
You must be signed in to change notification settings - Fork 437
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 for "Sliders in examples don't react properly to clicks" #1457
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1457 +/- ##
==========================================
- Coverage 87.49% 87.48% -0.01%
==========================================
Files 241 241
Lines 30789 30805 +16
Branches 3322 3322
==========================================
+ Hits 26939 26951 +12
- Misses 3074 3078 +4
Partials 776 776
Continue to review full report at Codecov.
|
dipy/viz/ui.py
Outdated
@@ -1851,7 +1851,7 @@ def handle_events(self, actor): | |||
|
|||
""" | |||
self.add_callback(self.slider_line, "LeftButtonPressEvent", | |||
self.line_click_callback) | |||
self.line_click_callback,1) |
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.
Add a space after the ,
in accordance with PEP8.
line_slider = ui.LineSlider2D(initial_value=-2, | ||
min_value=-5, max_value=5) | ||
|
||
line_slider.add_callback(line_slider.slider_disk, | ||
"MouseMoveEvent", | ||
translate_green_cube) | ||
|
||
line_slider.add_callback(line_slider.slider_line, |
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.
Can you do the same for the disk slider also? Let's merge both these into this PR.
Please also update viz_advanced.py. Once that is done, I think this is ready to merge. |
is it ready to go @dmreagan? |
Fix for "Sliders in examples don't react properly to clicks"
This PR fixes issue #1454
translate_green_cube
on"LeftButtonPressEvent"
.self.line_click_callback
inui.py
to ensure that the position of disk gets updated before moving the cube.