Repository navigation
Fix right-to-left and bottom-to-top layout for continuous manifests - #1994
Conversation
|
@kirschbombe is attempting to deploy a commit to the Universal Viewer Team on Vercel. A member of the Team first needs to authorize it. |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
demiankatz
left a comment
There was a problem hiding this comment.
Thanks, @kirschbombe, this makes sense to me -- see below for one small suggestion.
demiankatz
left a comment
There was a problem hiding this comment.
Looks good to me now, @kirschbombe -- thanks for this! I'll hold off on merging until others have had a chance to weigh in, but I've put this on the 4.5 milestone and the community board "in testing" column to ensure we don't lose track of it.
|
On a side note, I notice that our example manifest list has a "Tests" section containing "Top to Bottom" and "Bottom to Top," but these manifests no longer seem to exist. Are there cookbook recipes for this that we could replace those examples with? (Obviously, we don't have to do that as part of this PR, but this is just a reminder that it might be useful to sort that out). |
|
@demiankatz -- Here are some test manifests:
I don't know of any bottom-to-top manifests. |
Fix right-to-left and bottom-to-top layout for continuous manifests
Manifests with
behavior: continuousandviewingDirection: right-to-leftshow their canvases left-to-right.bottom-to-topis also broken: the canvases don't stack in the right order. This PR fixes both directions.Example manifest - a Japanese scroll: https://iiif.library.ucla.edu/ark%3A%2F21198%2Fz1n88rtf/manifest
Summary of changes
!isRightToLeft(), so continuous manifests with noviewingDirectiondefault to left-to-right.Contributor checklist
Compatibility & interoperability
Code quality & testing
I tested these layouts:
Configuration & documentation
Additional notes for reviewers:
Continuous manifests with exactly two canvases still ignore
right-to-leftandbottom-to-top. That's becausegetPagePositions()has a separate two-canvas branch, and I didn't want to touch that. Sending two-canvas manifests through the main loop would fix the direction, but it also drops thepageGapspacing that search-result highlighting seems to depend on? I left that alone since I wasn't sure and wanted to avoid another regression.