Skip to content

Commit

Permalink
Activate next result button on single canvas
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesmisson authored Jul 8, 2024
1 parent 4476ece commit 14de5c6
Showing 1 changed file with 1 addition and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand All @@ -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[] {
Expand Down

0 comments on commit 14de5c6

Please sign in to comment.