From cbb51b9f67887257cef0195003f42397e4a71408 Mon Sep 17 00:00:00 2001 From: haha Date: Thu, 11 Jul 2024 00:03:18 +0800 Subject: [PATCH] update code --- src/components/flow/FlowLink.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/flow/FlowLink.js b/src/components/flow/FlowLink.js index f197663..2014208 100644 --- a/src/components/flow/FlowLink.js +++ b/src/components/flow/FlowLink.js @@ -16,11 +16,11 @@ class FlowLinkModel extends PolylineEdgeModel { getEdgeAnimationStyle() { let tmps=this.graphModel.edges.filter(d=>d.targetNodeId==this.sourceNodeId||d.sourceNodeId==this.sourceNodeId); - const colors=["#d34836","#0f9d58","#ff7f0e","#2ec2b3","#24799e","#7fba00","#4A148C","#1E88E5","#827717","#4E342E"] ; + const colors=["#d34836","#0f9d58","#ff7f0e","#2ec2b3","#24799e","#7fba00","#4A148C","#1E88E5","#827717","#4E342E","#212121","#76FF03","#004D40","#2962FF","#283593"] ; const style = super.getEdgeAnimationStyle(); style.strokeDasharray = "5 5"; - style.stroke=colors[tmps.indexOf(this)]; + style.stroke=colors[tmps.indexOf(this)%colors.length]; style.animationDuration = "60s"; return style; }