From 349032ef1adf2b82dd58d23164b884071ae574ba Mon Sep 17 00:00:00 2001 From: Edward Silverton Date: Thu, 9 Nov 2023 15:09:30 +0000 Subject: [PATCH] use settimeout --- package.json | 2 +- .../iiif/modules/uv-contentleftpanel-module/TreeView.ts | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 2e155afa8..3332054c2 100644 --- a/package.json +++ b/package.json @@ -87,7 +87,7 @@ "@edsilv/utils": "^1.0.2", "@google/model-viewer": "^1.9.2", "@iiif/base-component": "2.0.1", - "@iiif/iiif-av-component": "1.2.3", + "@iiif/iiif-av-component": "1.2.4", "@iiif/iiif-gallery-component": "^1.1.21", "@iiif/iiif-metadata-component": "^1.1.19", "@iiif/iiif-tree-component": "2.0.4", 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 7a2fdfa5b..686b8c69d 100644 --- a/src/content-handlers/iiif/modules/uv-contentleftpanel-module/TreeView.ts +++ b/src/content-handlers/iiif/modules/uv-contentleftpanel-module/TreeView.ts @@ -33,7 +33,6 @@ export class TreeView extends BaseView { "treeNodeSelected", function(node: TreeNode) { that.extensionHost.publish(IIIFEvents.TREE_NODE_SELECTED, node); - this.resize(); // renders the tree component and highlights the selected element }, false ); @@ -75,7 +74,9 @@ export class TreeView extends BaseView { } } - this.treeComponent.selectNode(node); + setTimeout(() => { + this.treeComponent.selectNode(node); + }, 0); } public expandNode(node: TreeNode, expanded: boolean): void {