From 82c8472d14dcd43c3f964b412fccb8e8351fe924 Mon Sep 17 00:00:00 2001 From: Saira-A <139405429+Saira-A@users.noreply.github.com> Date: Tue, 27 Aug 2024 10:09:12 +0100 Subject: [PATCH] types / comment --- .../modules/uv-contentleftpanel-module/ContentLeftPanel.ts | 6 +++--- .../iiif/modules/uv-contentleftpanel-module/TreeView.ts | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/content-handlers/iiif/modules/uv-contentleftpanel-module/ContentLeftPanel.ts b/src/content-handlers/iiif/modules/uv-contentleftpanel-module/ContentLeftPanel.ts index 64448c1ba..c1ab3eb35 100644 --- a/src/content-handlers/iiif/modules/uv-contentleftpanel-module/ContentLeftPanel.ts +++ b/src/content-handlers/iiif/modules/uv-contentleftpanel-module/ContentLeftPanel.ts @@ -768,9 +768,9 @@ export class ContentLeftPanel extends LeftPanel { selectCurrentTreeNodeByCanvas(): void { if (this.treeView) { let node: TreeNode | null = null; - const currentCanvasTopRangeIndex = this.getCurrentCanvasTopRangeIndex(); - const selectedTopRangeIndex = this.getSelectedTopRangeIndex(); - const usingCorrectTree = + const currentCanvasTopRangeIndex: number = this.getCurrentCanvasTopRangeIndex(); + const selectedTopRangeIndex: number = this.getSelectedTopRangeIndex(); + const usingCorrectTree: boolean = currentCanvasTopRangeIndex === selectedTopRangeIndex; let range: Range | null = null; diff --git a/src/content-handlers/iiif/modules/uv-contentleftpanel-module/TreeView.ts b/src/content-handlers/iiif/modules/uv-contentleftpanel-module/TreeView.ts index 4e01da2be..f493c4ff9 100644 --- a/src/content-handlers/iiif/modules/uv-contentleftpanel-module/TreeView.ts +++ b/src/content-handlers/iiif/modules/uv-contentleftpanel-module/TreeView.ts @@ -86,6 +86,7 @@ export class TreeView extends BaseView { this.treeComponent.expandParents(node, true); // Expand node parents const link: Element | undefined = this.$tree.find("#tree-link-" + node.id)[0]; if (link) { + //commented out as bug where scrolls to wrong node eg in Villanova collection // link.scrollIntoViewIfNeeded(); }