192
192
</div >
193
193
</div >
194
194
<div >
195
- <b-tooltip label =" menu for selecting networks" type =" is-light" multilined >
196
- <b-dropdown v-model =" showEdgetType" class =" is-right" aria-role =" list" >
197
- <button class =" button is-light" slot =" trigger" >
198
- <b-icon icon =" bars" ></b-icon >
199
- </button >
200
- <!-- need to fix the below -->
201
- <b-dropdown-item v-for =" ( n, index ) in networks" :key =" index" :value =" n" @click =" setEdge(n)" >
202
- <font color =" #202020" >{{ n }}</font >
203
- </b-dropdown-item >
204
- </b-dropdown >
205
- </b-tooltip >
195
+ <b-dropdown v-model =" showEdgeType" aria-role =" list" :triggers =" ['hover']" >
196
+ <b-button label =" Link Type" type =" is-light" slot =" trigger" />
197
+ <b-dropdown-item v-for =" ( n, index ) in networks" :key =" index" :value =" n" aria-role =" listitem" >
198
+ <font color =" #202020" >{{ n }}</font >
199
+ </b-dropdown-item >
200
+ </b-dropdown >
206
201
</div >
207
202
<div class =" column" />
208
203
</div >
@@ -593,9 +588,7 @@ export default {
593
588
return ;
594
589
}
595
590
596
- const nodes = this .nodes .map ( d => Object .create ( d ) );
597
- // const links = this.edges.map( d => Object.create( d ) );
598
-
591
+ const nodes = this .nodes ;
599
592
const links = this .edges .filter ( (d ) => {
600
593
switch ( this .showEdgeType ) {
601
594
case ' all' : {
@@ -612,7 +605,7 @@ export default {
612
605
}
613
606
}, this );
614
607
615
- const width = 600 ;
608
+ const width = 600 ;
616
609
const height = 400 ;
617
610
618
611
const simulation = d3 .forceSimulation ( nodes )
@@ -982,6 +975,10 @@ export default {
982
975
this .generateGraph ();
983
976
this .generateChord ();
984
977
}
978
+ },
979
+
980
+ showEdgeType : function () {
981
+ this .generateGraph ();
985
982
}
986
983
},
987
984
@@ -1027,4 +1024,8 @@ export default {
1027
1024
.modal-card-title {
1028
1025
color : whitesmoke ;
1029
1026
}
1027
+
1028
+ .dropdown-item.is-active {
1029
+ background-color : whitesmoke ;
1030
+ }
1030
1031
</style >
0 commit comments