From 1584cccee9a2981e41cd9e065cac3db67cd9d1da Mon Sep 17 00:00:00 2001 From: Saira-A <139405429+Saira-A@users.noreply.github.com> Date: Tue, 24 Sep 2024 13:03:11 +0100 Subject: [PATCH] refactor --- .../uv-contentleftpanel-module/ContentLeftPanel.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 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 9eb426286..e6c57b45e 100644 --- a/src/content-handlers/iiif/modules/uv-contentleftpanel-module/ContentLeftPanel.ts +++ b/src/content-handlers/iiif/modules/uv-contentleftpanel-module/ContentLeftPanel.ts @@ -283,7 +283,7 @@ export class ContentLeftPanel extends LeftPanel { if (!treeData) { return; } - if (!this.defaultToThumbsView() || this.extension.helper.treeHasNavDates(treeData)) { + if (!this.defaultToThumbsView()) { this.$treeViewOptions.show(); } else { this.$treeViewOptions.hide(); @@ -617,10 +617,10 @@ export class ContentLeftPanel extends LeftPanel { false ); - const treeData: TreeNode | null = this.getTree() + const treeData: TreeNode | null = this.getTree(); - if (defaultToTreeIfCollection && this.isCollection()) { - return false; // Default to tree view if the manifest is a collection + if (this.isCollection() && (defaultToTreeIfCollection || (treeData && this.extension.helper.treeHasNavDates(treeData)))) { + return false; } if (defaultToTreeEnabled) {