File tree Expand file tree Collapse file tree 2 files changed +18
-17
lines changed Expand file tree Collapse file tree 2 files changed +18
-17
lines changed Original file line number Diff line number Diff line change 43
43
stroke : # 4a7b9d ;
44
44
stroke-width : 0.1em ;
45
45
stroke-opacity : 40% ;
46
+ fill : none;
46
47
}
47
48
48
49
.link_indirect {
49
50
stroke : # 54577c ;
50
51
stroke-width : 0.1em ;
51
52
stroke-opacity : 50% ;
53
+ fill : none;
52
54
}
53
55
54
56
.link_weak .highlight {
55
57
stroke : red;
56
58
stroke-width : 0.1em ;
57
59
stroke-opacity : 50% ;
60
+ fill : none;
58
61
}
59
62
60
63
.link_indirect .highlight {
61
64
stroke : red;
62
65
stroke-width : 0.1em ;
63
66
stroke-opacity : 50% ;
67
+ fill : none;
64
68
}
65
69
66
70
.link .highlight {
67
71
stroke : red;
68
72
stroke-width : 0.2em ;
73
+ fill : none;
69
74
}
70
75
71
76
.node_text {
Original file line number Diff line number Diff line change @@ -713,23 +713,19 @@ class ForceGraphD3 extends React.Component {
713
713
. enter ( )
714
714
. append ( "path" )
715
715
. attr ( "class" , `link ${ styles . link } ` )
716
- // .join(
717
- // (enter) => enter.append("line").attr("class", `link ${styles.link}`),
718
- // (update) => update.attr("class", `link ${styles.link}`)
719
- // )
720
- // .attr("class", (d) => {
721
- // // Here we're using the weight of the edges between
722
- // // nodes to change the properties of the line drawn
723
- // if (d.type === "direct") {
724
- // if (d.value > weightCutoff) {
725
- // return `link ${styles.link}`;
726
- // } else {
727
- // return `link ${styles.link_weak}`;
728
- // }
729
- // } else {
730
- // return `link ${styles.link_indirect}`;
731
- // }
732
- // })
716
+ . attr ( "class" , ( d ) => {
717
+ // Here we're using the weight of the edges between
718
+ // nodes to change the properties of the line drawn
719
+ if ( d . type === "direct" ) {
720
+ if ( d . value > weightCutoff ) {
721
+ return `link ${ styles . link } ` ;
722
+ } else {
723
+ return `link ${ styles . link_weak } ` ;
724
+ }
725
+ } else {
726
+ return `link ${ styles . link_indirect } ` ;
727
+ }
728
+ } )
733
729
. attr ( "id" , ( d ) => {
734
730
return d . id ;
735
731
} )
You can’t perform that action at this time.
0 commit comments