Fire IIIF.DOWNLOAD for openseadragon downloads#1530
Fire IIIF.DOWNLOAD for openseadragon downloads#1530demiankatz merged 1 commit intoUniversalViewer:devfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Pass an `onDownload` callback to the download dialogue for openseadragon that simply publishes a DOWNLOAD event when one of the download options is clicked. I enmulated the payload for the DOWNLOAD event for the AV extension: https://github.com/UniversalViewer/universalviewer/blob/8eeee2452f4fc4d22777fdffcf3ac9d60e2bdd32/src/content-handlers/iiif/extensions/uv-av-extension/DownloadDialogue.ts#L76-L79
a797c27 to
18ac845
Compare
|
I tested this by dropping the following into the script section of uv.on("download", function({ payload, cb })) {
console.log(payload);
}Then I loaded the example at localhost:8080, downloaded one of the options, and observed the log statement in the console |
|
Thanks, @sarangj. Your implementation makes sense to me, but since I'm not familiar with the existing usage of the download event, I'm not sure if there might be any concerns about adding this functionality (though I suspect there will not be). I'm moving this to the "in testing" column of the community board to encourage others to take a look and try it out; we will likely have time to discuss further at the next Community Call. Please let me know if there's anything else I can do to help in the meantime! (I see no reason not to approve this, but since I don't currently have time to do hands-on testing, I'm not going to do it just yet -- I'll wait and see what others have to say; but if you need me to take a closer look later to keep things moving forward, just let me know and I'll do my best to assist). |
|
@demiankatz thanks for looking and throwing it on the board! Is the schedule for community calls publicized anywhere? Just want to get a rough sense of a timeline to communicate back with my team! |
|
@sarangj, the community call generally happens on the first Thursday of the month at 11am Eastern time. You can find this on the IIIF community calendar, though I also recommend following the #community-chat channel of the Universal Viewer Slack, since any rescheduled instances get announced there. As far as I know, the next meeting will take place on the regular schedule on September 4. |
|
@demiankatz got it, thanks! |
|
I can run the test today since I have some time available. |
|
The download option shows up and works as expected when clicked. I also did a quick test in HTML to trigger the event, and the payload logged correctly in the console. Everything seems consistent with the existing behaviour, and I didn’t notice any issues. Thanks @sarangj and @demiankatz |
demiankatz
left a comment
There was a problem hiding this comment.
Thanks, @sarangj and @LanieOkorodudu, I think this should be safe to merge.
|
Thank you both @demiankatz and @LanieOkorodudu ! |
#1523
Description of what you did:
open to feedback on how this is implemented or if this makes sense at all, tried to follow existing patterns in this extension!
Pass an
onDownloadcallback to the download dialogue for openseadragon that simply publishes a DOWNLOAD event when one of the download options is clicked. I enmulated the payload for the DOWNLOAD event for the AV extension:universalviewer/src/content-handlers/iiif/extensions/uv-av-extension/DownloadDialogue.ts
Lines 76 to 79 in 8eeee24