Add minimum image width to download options#1716
Add minimum image width to download options#1716jamesmisson merged 7 commits intoUniversalViewer:devfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
@jamesmisson is attempting to deploy a commit to the Universal Viewer Team on Vercel. A member of the Team first needs to authorize it. |
demiankatz
left a comment
There was a problem hiding this comment.
Thanks, @jamesmisson, see below for a few suggestions (one stylistic, the other perhaps slightly more significant). In any case, nitpicks aside, this makes sense to me in principle!
src/content-handlers/iiif/extensions/uv-openseadragon-extension/DownloadDialogue.tsx
Outdated
Show resolved
Hide resolved
src/content-handlers/iiif/extensions/uv-openseadragon-extension/DownloadDialogue.tsx
Outdated
Show resolved
Hide resolved
src/content-handlers/iiif/extensions/uv-openseadragon-extension/DownloadDialogue.tsx
Outdated
Show resolved
Hide resolved
src/content-handlers/iiif/extensions/uv-openseadragon-extension/DownloadDialogue.tsx
Outdated
Show resolved
Hide resolved
Co-authored-by: Demian Katz <demian.katz@villanova.edu>
Co-authored-by: Demian Katz <demian.katz@villanova.edu>
demiankatz
left a comment
There was a problem hiding this comment.
Thanks, @jamesmisson, the logic fixes look good -- now we just need to agree on the best solution for the constant. I'm really fine with either of my proposed approaches, but I think we should do one or the other.
demiankatz
left a comment
There was a problem hiding this comment.
Code all looks good now, but it occurs to me that we need to add this to manual/CONFIG.md to keep the documentation up to date! Do you mind doing that before we merge this?
|
Good point, thanks @demiankatz |
demiankatz
left a comment
There was a problem hiding this comment.
This looks ready to go now!
This adds a
minImageWidthconfig option to the download dialogue that checks for a minimum image width before offering the option to download the image.It gets the
maxWidthas usual, then checks this against theminImageWidth. If themaxWidthis greater than theminImageWidth, it gets displayed as a download option. If it's smaller, no download is allowed.E.g. this manifest has a
maxWidthof 512 on the images and needs download restricted according to the item's RAQ ID: https://stage.bl.digirati.io/manifests/ark:/81055/vdc_100170823639.0x000001Setting the download dialogue options to the following will display the 'no download available' message in the download dialogue: