diff options
| author | Terry Truong <terry06890@gmail.com> | 2022-07-01 22:58:17 +1000 |
|---|---|---|
| committer | Terry Truong <terry06890@gmail.com> | 2022-07-01 22:58:17 +1000 |
| commit | 0e5ec48af629a9a9c235b07cc176491e7f2ef860 (patch) | |
| tree | 47a67d56f680c641eaa800fd314427af7620d3fa /src | |
| parent | 52ae29c5a40fd68aca12448bc85c98841521d6d7 (diff) | |
Fix abruptness/cancellation of an expansion done quickly after a tree-setting change
Diffstat (limited to 'src')
| -rw-r--r-- | src/App.vue | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/App.vue b/src/App.vue index 13da971..e368342 100644 --- a/src/App.vue +++ b/src/App.vue @@ -872,7 +872,7 @@ export default defineComponent({ } }, // For initialisation - async initTreeFromServer(){ + async initTreeFromServer(firstInit = true){ // Query server let urlParams = 'type=node'; urlParams += '&tree=' + this.uiOpts.tree; @@ -903,8 +903,10 @@ export default defineComponent({ await this.updateAreaDims(); this.relayoutWithCollapse(false); // Skip initial transition - this.justInitialised = true; - setTimeout(() => {this.justInitialised = false}, this.uiOpts.transitionDuration); + if (firstInit){ + this.justInitialised = true; + setTimeout(() => {this.justInitialised = false}, this.uiOpts.transitionDuration); + } }, async reInit(){ if (this.activeRoot != this.layoutTree){ @@ -912,8 +914,7 @@ export default defineComponent({ await this.onDetachedAncestorClick(this.layoutTree); } await this.onNonleafClick(this.layoutTree); - await timeout(this.uiOpts.transitionDuration); - await this.initTreeFromServer(); + await this.initTreeFromServer(false); }, getLytOpts(): LayoutOptions { let opts = getDefaultLytOpts(); |
