Skip to content
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

Start implementing 'always-on' MouseInteraction #213

Merged
merged 7 commits into from
Apr 6, 2021

Conversation

astrofrog
Copy link
Member

@astrofrog astrofrog commented Mar 29, 2021

@maartenbreddels - this is what I have so far but I have run into an issue which is that the print statement to show when mouse interactions are received only works if you first select a tool, e.g. rectangular selection. For some reason it doesn't work before this, when next is set to None.

Note that there is also a default 'click and drag ROI' mouse mode that gets selected when other tools aren't selected - this doesn't seem to play nicely with having a MouseInteration that has a next which is the ROI MouseInteraction, so this will also require some investigation.

Note that this requires glue-viz/bqplot-image-gl#46

@codecov
Copy link

codecov bot commented Mar 29, 2021

Codecov Report

Merging #213 (bee7c4d) into master (ce94a93) will decrease coverage by 0.09%.
The diff coverage is 86.20%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #213      +/-   ##
==========================================
- Coverage   90.57%   90.47%   -0.10%     
==========================================
  Files          83       82       -1     
  Lines        3988     3959      -29     
==========================================
- Hits         3612     3582      -30     
- Misses        376      377       +1     
Impacted Files Coverage Δ
glue_jupyter/bqplot/common/viewer.py 89.58% <69.23%> (-3.19%) ⬇️
glue_jupyter/bqplot/common/tools.py 75.22% <100.00%> (ø)
glue_jupyter/bqplot/histogram/layer_artist.py 91.66% <100.00%> (ø)
glue_jupyter/bqplot/profile/layer_artist.py 93.20% <100.00%> (ø)
glue_jupyter/bqplot/scatter/layer_artist.py 99.42% <100.00%> (ø)
glue_jupyter/bqplot/tests/test_bqplot.py 100.00% <100.00%> (ø)
glue_jupyter/common/state3d.py 81.69% <100.00%> (ø)
glue_jupyter/ipyvolume/scatter/layer_artist.py 98.00% <100.00%> (ø)
glue_jupyter/ipyvolume/volume/layer_artist.py 95.91% <100.00%> (ø)
glue_jupyter/link.py 56.25% <100.00%> (ø)
... and 4 more

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 ce94a93...bee7c4d. Read the comment docs.

@maartenbreddels
Copy link
Collaborator

@astrofrog would be great if you can try again with glue-viz/bqplot-image-gl#47

@astrofrog
Copy link
Member Author

@maartenbreddels - the CI is being a bit slow to start but this is ready for review.

@astrofrog astrofrog force-pushed the always-on-mouse-interaction branch from f8bd8a4 to bee7c4d Compare April 1, 2021 13:04
@astrofrog
Copy link
Member Author

(I just rebased this)

@astrofrog
Copy link
Member Author

This seems to work fine for spacetelescope/jdaviz#429

Copy link
Collaborator

@maartenbreddels maartenbreddels left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, the only 'downside' i see is that we'll always get a lot of events. We could possibly add an extra argument to the add_event_callback which events we want to listen to, and set _mouse_interact.events based on that. But, we can postpone that for now.

@astrofrog
Copy link
Member Author

@maartenbreddels - yes good idea. I'll merge this for now and will add something like this in a follow-up PR.

@astrofrog astrofrog merged commit 492c93e into glue-viz:master Apr 6, 2021
@pllim
Copy link
Contributor

pllim commented Apr 13, 2021

Is this released? If not what is the timeline? This is blocking spacetelescope/jdaviz#429

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants