From fc402120ba4248a4ad8711bd490dad8786124006 Mon Sep 17 00:00:00 2001 From: vhaudiquet Date: Sun, 24 Nov 2024 11:26:21 +0100 Subject: [PATCH] Isolate drawTreeArrows --- frontend/components/TreeItem.vue | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/frontend/components/TreeItem.vue b/frontend/components/TreeItem.vue index 4b640e1..3e879a7 100644 --- a/frontend/components/TreeItem.vue +++ b/frontend/components/TreeItem.vue @@ -21,7 +21,7 @@ const start = ref(null) const arrows = [] -onMounted(() => { +function drawTreeArrows() { if(start.value == null) return; for(let dest of treeItems.value) { console.log(dest) @@ -46,6 +46,10 @@ onMounted(() => { }) arrows.push(arrow) } +} + +onMounted(() => { + drawTreeArrows() }) onUnmounted(() => { for(let arrow of arrows) {