1+ const cytoscape = require ( 'cytoscape' ) ;
2+
3+ const iStylesheet = cytoscape . stylesheet ( )
4+ . selector ( 'edge' )
5+ . css ( {
6+ 'opacity' : 0.3 ,
7+ 'arrow-scale' : 1.75 ,
8+ 'curve-style' : 'bezier' ,
9+ 'line-color' : '#555' ,
10+ 'target-arrow-fill' : 'hollow' ,
11+ 'source-arrow-fill' : 'hollow' ,
12+ 'width' : node => node . data ( 'similarity' ) * 2 ,
13+ 'target-arrow-color' : '#555' ,
14+ 'source-arrow-color' : '#555' ,
15+ 'text-border-color' : '#555' ,
16+ 'color' : '#555'
17+ } )
18+ . selector ( 'node[class="ball"]' )
19+ . css ( {
20+ 'font-size' : 20 ,
21+ 'color' : 'black' ,
22+ 'background-color' : 'grey' , //TODO: Colored accoriding to p-value
23+ 'background-opacity' :0.8 ,
24+ 'text-outline-color' : 'white' ,
25+ 'text-outline-width' : 2 ,
26+ 'text-wrap' : 'wrap' ,
27+ 'text-max-width' : 175 ,
28+ 'width' : node => node . data ( 'size' ) ? node . data ( 'size' ) : 30 ,
29+ 'height' : node => node . data ( 'size' ) ? node . data ( 'size' ) : 30 ,
30+ 'label' : node => node . data ( 'label' ) ,
31+ 'text-halign' : 'center' ,
32+ 'text-valign' : 'center' ,
33+ } )
34+ . selector ( 'node[?queried]' )
35+ . css ( {
36+ 'background-color' : 'blue' ,
37+ 'opacity' : 1 ,
38+ 'z-compound-depth' : 'top' ,
39+ 'color' : 'white' ,
40+ 'text-outline-color' : 'black'
41+ } ) ;
42+ module . exports = iStylesheet ;
0 commit comments