姜玉琦 2024-07-11 01:27:45 +08:00
commit 0a574c34df
1 changed files with 3 additions and 2 deletions

View File

@ -16,11 +16,12 @@ 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=["#EF5350","#B71C1C","#F06292","#C2185B","#AB47BC","#4A148C","#311B92","#304FFE","#2196F3","#0D47A1","#00BCD4","#006064","#004D40","#1DE9B6","#00C853",
"#33691E","#FDD835","#FF6F00","#3E2723","#212121"] ;
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;
}