-
Notifications
You must be signed in to change notification settings - Fork 26
Maintain camera zoom when applicable #1941
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
Conversation
9bc2c19 to
83ce18d
Compare
packages/app/src/vis-packs/core/complex/MappedComplexHeatmapVis.tsx
Outdated
Show resolved
Hide resolved
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.
Reading back ##1572, it may be useful to also add the feature to Line as well.
I am also wondering about something. Consider the following sequence:
- I view
Image1with Heatmap. I zoom in. - I view
Image2with Heatmap`. It has the same dimensions so the zoom is conserved. - I view another unrelated dataset (say a line). The zoom is not conserved since the key is different.
- I view
Image2again. Is the zoom reset or because the entry is still in the store, I get a zoomed-in display?
packages/app/src/vis-packs/core/complex/MappedComplexHeatmapVis.tsx
Outdated
Show resolved
Hide resolved
|
I'm realising however, that this only applies when both visualizations have Regarding adding
Perhaps |
I see your point. Perhaps let's not add anything to |
bf4c4f4 to
3219a44
Compare
|
Alright, I think I've got it:
I've updated the PR description accordingly; let me know what you think. I think the proposed behaviour for the line vis fits with what was requested in #1572 and compensates nicely for the lack of an x-axis domain widget. |
3219a44 to
3186d39
Compare
Fix #1572
Contrary to what I initially suggested in the issue above, I went with a solution that's fully transparent for users. There's no "pin" button; everything is automatic. The solution relies on the axis domains to decide whether to restore the camera scale and position:
visContextKeystring computed from the axis domain(s).The store can keep the camera states of multiple visualizations at once (cf.
visKeyprop ofKeepZoom).Screencast.from.2026-01-14.10-25-19.webm
For the Line visualization, the zoom gets saved as long the user zooms only on the
xaxis (cfxOnlyprop):Screencast.from.2026-01-14.13-32-56.webm