Conversation
917dba5 to
e99a48d
Compare
c45d2b5 to
aaf65ee
Compare
aaf65ee to
e78884b
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4220 +/- ##
=======================================
- Coverage 95.3% 95.2% -0.0%
=======================================
Files 326 326
Lines 16200 16220 +20
Branches 2555 2569 +14
=======================================
+ Hits 15423 15440 +17
- Misses 772 774 +2
- Partials 5 6 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
jcoyne
approved these changes
Mar 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Addresses:
#4217
#4199
This is different from the aspect ratio calculation (#4117) and just recalculates the center if the bounds change at all. I'm interested to hear opinions on that -- it was just easier for me to get my head around but might not be what we want.
Behavior resulting from this PR:
preserveViewport: false: each page resets its zoom and center, including between pages with different bounds/sizes (such as paging from a cover --> 2-page book spread)preserveViewport: true: zoom and pan is kept between pages. Re-centering does not occur between pages with different bounds/sizes. If you are zoomed in on a book cover, and then page into a 2-page spread, the spread will be off-center. If you then center the 2-page spread and continue to page forward, the rest of the 2-page spreads will be centered.Seeking input on:
initialViewerConfig(to test, see the demo page at https://deploy-preview-4220--mirador-dev.netlify.app/viewer-config) -- now thatpreserveViewportis actually working, I would love input on this setting. Right now ifinitialViewerConfigis set andpreserveViewport: false(again, this is the new default), the manifest loads the initialConfig, but on paging forward, the views are reset. Is this the intended behavior?