From 727af3b9827a30fd07cdbbf853c432f802726661 Mon Sep 17 00:00:00 2001 From: Adam Trotta Date: Tue, 26 Mar 2024 15:16:21 -0400 Subject: [PATCH] temp: wip --- packages/components/src/components/DiagramComponent.vue | 6 +++++- packages/components/src/pages/VsCodeExtension.vue | 4 ++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/packages/components/src/components/DiagramComponent.vue b/packages/components/src/components/DiagramComponent.vue index 280d582727..77e961b9ae 100644 --- a/packages/components/src/components/DiagramComponent.vue +++ b/packages/components/src/components/DiagramComponent.vue @@ -140,7 +140,8 @@ export default { }, renderDiagram() { - this.$nextTick(() => { + this.$emit('dependencyMapLoading', true); + this.$nextTick(async () => { this.componentDiagram = new ComponentDiagram(this.$el, { theme: this.theme, zoom: { @@ -148,6 +149,7 @@ export default { }, }); this.componentDiagram.render(this.classMap); + await new Promise((resolve) => setTimeout(resolve, 1000)); this.componentDiagram .on('click', (codeObject) => this.selectCodeObject(codeObject)) @@ -162,6 +164,8 @@ export default { } else { this.handleHighlightedEvent(); } + await this.$nextTick(); + this.$emit('dependencyMapLoading', false); }); }, diff --git a/packages/components/src/pages/VsCodeExtension.vue b/packages/components/src/pages/VsCodeExtension.vue index 91b3b10b30..2173b4a2fa 100644 --- a/packages/components/src/pages/VsCodeExtension.vue +++ b/packages/components/src/pages/VsCodeExtension.vue @@ -85,6 +85,7 @@ @@ -910,6 +911,9 @@ export default { }, }, methods: { + setIsDiagramLoading(isLoading) { + this.isDiagramLoading = isLoading; + }, async applyFilters(filter, appMap) { this.isDiagramLoading = true; this.$nextTick(async () => {