From 14de5c65e094d2c0c299627849dac1b79c922012 Mon Sep 17 00:00:00 2001 From: James Misson <71402529+jamesmisson@users.noreply.github.com> Date: Mon, 8 Jul 2024 17:11:26 +0100 Subject: [PATCH] Activate next result button on single canvas --- .../modules/uv-searchfooterpanel-module/FooterPanel.ts | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/content-handlers/iiif/modules/uv-searchfooterpanel-module/FooterPanel.ts b/src/content-handlers/iiif/modules/uv-searchfooterpanel-module/FooterPanel.ts index 82b7c14aa..eedb7f6e2 100644 --- a/src/content-handlers/iiif/modules/uv-searchfooterpanel-module/FooterPanel.ts +++ b/src/content-handlers/iiif/modules/uv-searchfooterpanel-module/FooterPanel.ts @@ -361,7 +361,6 @@ export class FooterPanel extends BaseFooterPanel< const currentCanvasIndex: number = this.extension.helper.canvasIndex; const lastSearchResultCanvasIndex: number = this.getLastSearchResultCanvasIndex(); const currentSearchResultRectIndex: number = this.getCurrentSearchResultRectIndex(); - const totalCanvases: number = this.extension.helper.getTotalCanvases(); // if zoom to search result is enabled and there is a highlighted search result. if ( @@ -381,11 +380,7 @@ export class FooterPanel extends BaseFooterPanel< return true; } - // if only one canvas then allow clicking next result - if (totalCanvases === 1) { - return true} - - return currentCanvasIndex < lastSearchResultCanvasIndex; + return currentCanvasIndex <= lastSearchResultCanvasIndex; } getSearchResults(): AnnotationGroup[] {