tlambert03 / microvis

Other
2 stars 2 forks source link

[WIP] sync camera with vispy backend #35

Open alisterburt opened 1 year ago

alisterburt commented 1 year ago

towards closing #22 - work in progress for now but the base is there

Potential complication, napari updates the camera model whenever the canvas is redrawn - I tried to avoid the need for a ref to the canvas by hooking directly into emitters on the vispy camera but it appears they aren't always called... could be an easy PR upstream, will look into it

edit: this also adds a vis_cleanup method to the BackendAdaptor, for cleaning up event connections on cameras - not abstract as won't always be needed

codecov[bot] commented 1 year ago

Codecov Report

Merging #35 (26b9d1b) into main (e0d6092) will increase coverage by 0.40%. The diff coverage is 89.47%.

:exclamation: Current head 26b9d1b differs from pull request most recent head caa08da. Consider uploading reports for the commit caa08da to get more accurate results

@@            Coverage Diff             @@
##             main      #35      +/-   ##
==========================================
+ Coverage   66.98%   67.38%   +0.40%     
==========================================
  Files          26       26              
  Lines         954      972      +18     
==========================================
+ Hits          639      655      +16     
- Misses        315      317       +2     
Impacted Files Coverage Δ
src/microvis/backend/vispy/_camera.py 64.58% <88.88%> (+12.97%) :arrow_up:
src/microvis/core/_vis_model.py 91.57% <100.00%> (+0.08%) :arrow_up:

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more