Maintain zoom level and center on window / viewer resize
See original GitHub issueIs it possible to maintain zoom level and center of viewport when we scaling browser window / viewer size? I have an application which need to keep zoom level and center remain same even when users resize the window, because my application synchronize OSD viewport to all connected users trough socket.io. It is look strange when there is user who resize window then send signal zoom and pan in OSD resize
event way and will give unnecessary disrupt other users viewport.
Issue Analytics
- State:
- Created 7 years ago
- Comments:12 (7 by maintainers)
Top Results From Across the Web
Change Zoom advanced options for accessibility on Mac
Change the size and position of the zoom window while working using the indicated keyboard shortcuts. Set the maximum and minimum levels of...
Read more >How do I keep images zoomed at the same level when ...
Zoom to the desired level and position. On the IrfanView menu bar, select View->Lock Zoom (Shift+L) and View->Keep Scroll position; Browse other images....
Read more >Adjusting your video layout during a virtual meeting
Customize your video layout preferences during your Zoom meetings—see everyone, hide participants, and much more.
Read more >Google maps set different zoom based on window resize
The following code works perfectly in regards of recentering the map on windows resize, I need to apply the new zoom levels to...
Read more >Zoom level inside Edge is much higher than is indicated
I use Windows 10 with 100% of scale set in Display and all text in ... But inside Edge viewer with indicated 100%...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The relevant code is here https://github.com/openseadragon/openseadragon/blob/master/src/viewer.js#L2988-L3009
It doesn’t look like there is a good event you can listen to to tweak the behavior. For now, you can try to modify that code like this and see if that works for you. We can figure out a better approach afterward.
@iangilman yes, you are right. It could be another alternative solution for my problem. @avandecreme that sounds good, it is new for me about
viewportToImageZoom
. @iangilman also mention about that function previously, but still not sure yet how i will manage it for my problem. Will make some experiment about that later.Thanks a lot for both of you.