pyapp-kit / ndv

Simple, fast-loading, n-dimensional array viewer with minimal dependencies.
BSD 3-Clause "New" or "Revised" License
29 stars 4 forks source link

feat: better mouse events and canvas2world methods #26

Closed tlambert03 closed 1 month ago

tlambert03 commented 1 month ago

establishes a pattern (using installEventFilter) for intercepting mouse and other events before the backend handles them. And uses it to do a better version of showing the data value over the cursor

tlambert03 commented 1 month ago

cc @gselzer ... your review would be appreciated

codecov[bot] commented 1 month ago

Codecov Report

Attention: Patch coverage is 85.71429% with 6 lines in your changes missing coverage. Please review.

Project coverage is 78.72%. Comparing base (4e0c5fe) to head (840df15).

:exclamation: Current head 840df15 differs from pull request most recent head 2f32e76

Please upload reports for the commit 2f32e76 to get more accurate results.

Files Patch % Lines
src/ndv/viewer/_viewer.py 90.62% 3 Missing :warning:
src/ndv/viewer/_backends/_protocols.py 0.00% 2 Missing :warning:
src/ndv/viewer/_backends/_pygfx.py 66.66% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #26 +/- ## ========================================== - Coverage 81.95% 78.72% -3.24% ========================================== Files 13 13 Lines 1236 1241 +5 ========================================== - Hits 1013 977 -36 - Misses 223 264 +41 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

tlambert03 commented 1 month ago

is there something tricky about adding PyGFXViewerCanvas.canvas_to_world now?

only that I couldn't figure it out! :) there must be a way to do it... but i spent a while and couldn't figure it out.