From da45c98e6698c2d8d555202a9929a2be460946a7 Mon Sep 17 00:00:00 2001 From: jamesmisson Date: Wed, 20 May 2026 17:19:26 +0100 Subject: [PATCH] get external resources before choice branch --- .../OpenSeadragonCenterPanel.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/content-handlers/iiif/modules/uv-openseadragoncenterpanel-module/OpenSeadragonCenterPanel.ts b/src/content-handlers/iiif/modules/uv-openseadragoncenterpanel-module/OpenSeadragonCenterPanel.ts index 924a8da3a..9c69191e4 100644 --- a/src/content-handlers/iiif/modules/uv-openseadragoncenterpanel-module/OpenSeadragonCenterPanel.ts +++ b/src/content-handlers/iiif/modules/uv-openseadragoncenterpanel-module/OpenSeadragonCenterPanel.ts @@ -867,6 +867,10 @@ export class OpenSeadragonCenterPanel extends CenterPanel< this.$spinner.show(); }, 200); + // we need to do this before the choice branch even though the branch doesn't use images, because getExternalResources populates the resources needed for the download dialogue + let images: IExternalResourceData[] = + await this.extension.getExternalResources(resources); + // check for a choice on either of the displayed canvases if in 2-up view const indices = this.extension.getPagedIndices(); const hasChoices = indices.some((index) => { @@ -985,9 +989,6 @@ export class OpenSeadragonCenterPanel extends CenterPanel< return; } - let images: IExternalResourceData[] = - await this.extension.getExternalResources(resources); - const isGirder: boolean = this.extension.format === MediaType.GIRDER; try {