You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 18, 2024. It is now read-only.
fix: LSDV-4708: Scroll page to canvas only if needed (#1268)
* fix: LSDV-4708: Scroll page to canvas only if needed
If canvas is already in the viewport, don't scroll the page!
* Scroll only if image region is not visible
scrollIntoViewIfNeeded scolls even if it's not really needed :(
* Add comments; fix zoomed image; add smooth
- hard to calculate region position on zoomed image and it can be hidden,
so don't scroll if image is zoomed in
- add behavior: smooth for better UX
* Improve scroll to region
* Huge improvement for zoomed and huge images
Zoomed in images makes it hard to calculate region bboxes,
so we are trying to make the whole image visible enough.
* Rename method for better readability
---------
Co-authored-by: yyassi-heartex <[email protected]>
0 commit comments