Skip to content

Commit

Permalink
temp: wip
Browse files Browse the repository at this point in the history
  • Loading branch information
ahtrotta committed Mar 26, 2024
1 parent f8b049f commit 727af3b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/components/src/components/DiagramComponent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -140,14 +140,16 @@ export default {
},
renderDiagram() {
this.$nextTick(() => {
this.$emit('dependencyMapLoading', true);
this.$nextTick(async () => {
this.componentDiagram = new ComponentDiagram(this.$el, {
theme: this.theme,
zoom: {
controls: this.zoomButtons,
},
});
this.componentDiagram.render(this.classMap);
await new Promise((resolve) => setTimeout(resolve, 1000));
this.componentDiagram
.on('click', (codeObject) => this.selectCodeObject(codeObject))
Expand All @@ -162,6 +164,8 @@ export default {
} else {
this.handleHighlightedEvent();
}
await this.$nextTick();
this.$emit('dependencyMapLoading', false);
});
},
Expand Down
4 changes: 4 additions & 0 deletions packages/components/src/pages/VsCodeExtension.vue
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@
<v-diagram-component
:class-map="filteredAppMap.classMap"
:highlighted-event-index="eventFilterMatchIndex"
@dependencyMapLoading="setIsDiagramLoading"
/>
</v-lazy-loader>
</v-tab>
Expand Down Expand Up @@ -910,6 +911,9 @@ export default {
},
},
methods: {
setIsDiagramLoading(isLoading) {
this.isDiagramLoading = isLoading;
},
async applyFilters(filter, appMap) {
this.isDiagramLoading = true;
this.$nextTick(async () => {
Expand Down

0 comments on commit 727af3b

Please sign in to comment.