From 7abdd02080fdbd8d4562d78886fc61e92e1ff903 Mon Sep 17 00:00:00 2001
From: Acha Bill <57879913+acha-bill@users.noreply.github.com>
Date: Fri, 26 Jun 2020 11:50:39 +0100
Subject: [PATCH] clear trunk and branch tip state onces they are referenced
 (#544)

---
 .../frontend/src/app/stores/VisualizerStore.ts       | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/plugins/dashboard/frontend/src/app/stores/VisualizerStore.ts b/plugins/dashboard/frontend/src/app/stores/VisualizerStore.ts
index e3ac3c5d..dff4fa73 100644
--- a/plugins/dashboard/frontend/src/app/stores/VisualizerStore.ts
+++ b/plugins/dashboard/frontend/src/app/stores/VisualizerStore.ts
@@ -108,6 +108,18 @@ export class VisualizerStore {
             }
             this.verticesIncomingOrder.push(vert.id);
             this.checkLimit();
+
+            //clear trunk and branch tip state
+            let trunkVert = this.vertices.get(vert.trunk_id)
+            let branchVert = this.vertices.get(vert.branch_id)
+            if(trunkVert) {
+                trunkVert.is_tip = false
+                this.vertices.set(trunkVert.id, trunkVert)
+            }
+            if(branchVert){
+                branchVert.is_tip = false
+                this.vertices.set(branchVert.id, branchVert)
+            }
         }
 
         this.vertices.set(vert.id, vert);
-- 
GitLab