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

Merged
merged 4 commits into from Apr 5, 2018

Conversation

Projects
5 participants
@karandeepSJ
Contributor

karandeepSJ commented Mar 13, 2018

This PR fixes issue #1454

  • A callback was added to call translate_green_cube on "LeftButtonPressEvent".
  • Priority given to self.line_click_callback in ui.py to ensure that the position of disk gets updated before moving the cube.

karandeepSJ added some commits Mar 13, 2018

@codecov-io

This comment has been minimized.

codecov-io commented Mar 13, 2018

Codecov Report

Merging #1457 into master will decrease coverage by <.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            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
Impacted Files Coverage Δ
dipy/viz/ui.py 89.3% <ø> (ø) ⬆️
dipy/core/graph.py 73.8% <0%> (-1.2%) ⬇️
dipy/viz/tests/test_actors.py 73.67% <0%> (-0.96%) ⬇️
dipy/reconst/forecast.py 92.22% <0%> (+2.07%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f6af802...66b86c1. Read the comment docs.

@dmreagan dmreagan requested review from dmreagan and ranveeraggarwal Mar 14, 2018

@@ -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)

This comment has been minimized.

@ranveeraggarwal

ranveeraggarwal Mar 18, 2018

Member

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,

This comment has been minimized.

@ranveeraggarwal

ranveeraggarwal Mar 18, 2018

Member

Can you do the same for the disk slider also? Let's merge both these into this PR.

@dmreagan dmreagan added this to UI PR needs a review in Viz Module Mar 22, 2018

@dmreagan

This comment has been minimized.

Contributor

dmreagan commented Mar 22, 2018

Please also update viz_advanced.py. Once that is done, I think this is ready to merge.

@skoudoro

This comment has been minimized.

Member

skoudoro commented Apr 3, 2018

is it ready to go @dmreagan?

@dmreagan dmreagan merged commit 52ca2ae into nipy:master Apr 5, 2018

2 of 3 checks passed

codecov/project 87.48% (-0.01%) compared to f6af802
Details
codecov/patch Coverage not affected when comparing f6af802...66b86c1
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

Viz Module automation moved this from UI PR needs a review to Done Apr 5, 2018

ShreyasFadnavis pushed a commit to ShreyasFadnavis/dipy that referenced this pull request Sep 20, 2018

Merge pull request nipy#1457 from karandeepSJ/issue-1454-fix
Fix for "Sliders in examples don't react properly to clicks"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment