-
Notifications
You must be signed in to change notification settings - Fork 75
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
POC: canvas rotation #1384
POC: canvas rotation #1384
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1384 +/- ##
==========================================
- Coverage 85.12% 85.07% -0.06%
==========================================
Files 91 93 +2
Lines 8314 8339 +25
==========================================
+ Hits 7077 7094 +17
- Misses 1237 1245 +8
Continue to review full report at Codecov.
|
* can currently control with: `imviz.app._viewer_item_by_id('imviz-0')['rotation'] = 60`
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.
As it stands, in the Imviz example notebook (2 images loaded, linked by pixel), when I rotate the canvas by, say, 45 degrees, the zoom box in Compass and the Home button no longer make sense to me. I also see noticeable lag when pan/zoom in the rotated canvas (and can hear my CPU churning away) but not sure what caused it. I'll add to the "todo" things to look at.
until we can figure out how to do it properly
@@ -78,6 +94,41 @@ module.exports = { | |||
* between a user closing a tab or a re-render. However, when the user closes a tab, the | |||
* source of the event is a vue component. We can use that distinction as a close signal. */ | |||
source.$root && this.closefn(viewerId); | |||
}, | |||
resizeViewer(viewer) { |
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.
I rotate to 45 degrees and then rotate back, but the Compass zoom box starts acting weird (i.e., it is showing the zoom limits that is a little off from what I am looking at). Since Compass grabs the numbers straight of viewer.state.x/y_min/max
attributes, something isn't sync-ing right after this operation but I don't know what. Is it the aspect ratio?
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.
Or maybe the WCS distortion in the Imviz example notebook data is causing trouble.
This needs clean-up for production. [ci skip]
TODO
docs/imviz/plugins.rst
. This should wait till after Doc Changes for June 2022 #1393 is merged to avoid conflicts.Description
This pull request rotates the entire viewer widget.
NOTE: currently this is hardcoded to 45 degrees for all viewers. This will need to be controlled by some state object... but we don't have access to the viewer state at this level, so will likely need to be a per-viewer dictionary in the app state that is then controlled from a plugin in the UI.Screen.Recording.2022-06-09.at.11.58.51.AM.mov
This would supersede #1340
Checklist for package maintainer(s)
This checklist is meant to remind the package maintainer(s) who will review this pull request of some common things to look for. This list is not exhaustive.
trivial
label.CHANGES.rst
?