File tree Expand file tree Collapse file tree 3 files changed +30
-1
lines changed Expand file tree Collapse file tree 3 files changed +30
-1
lines changed Original file line number Diff line number Diff line change @@ -11,3 +11,4 @@ node_modules/
11
11
bower_components /
12
12
/.project
13
13
/data.txt
14
+ /.README.md.html
Original file line number Diff line number Diff line change @@ -387,6 +387,29 @@ const FuncTree = class {
387
387
window . open ( url , '_blank' ) ;
388
388
}
389
389
} )
390
+ // Toggle/Untoggle labels
391
+ actions . push ( {
392
+ name : 'Toggle label' ,
393
+ iconClass : 'fa-toggle-off' ,
394
+ onClick : function ( ) {
395
+ const selectedLabel = d3 . select ( '#label-' + nodeId )
396
+ if ( selectedLabel . empty ( ) ) {
397
+ const selectedNode = d3 . select ( '#' + nodeId )
398
+ d3 . select ( "#labels" )
399
+ . append ( 'g' )
400
+ . attr ( 'id' , 'label-' + nodeId )
401
+ . attr ( 'transform' , selectedNode . attr ( "transform" ) )
402
+ . append ( 'text' )
403
+ . attr ( 'text-anchor' , 'middle' )
404
+ . attr ( 'font-family' , 'arial, sans-serif' )
405
+ . attr ( 'font-size' , 4 )
406
+ . attr ( 'fill' , '#555' )
407
+ . text ( selectedNode . attr ( "data-original-title" ) . replace ( / \[ .* \] / , '' ) )
408
+ } else {
409
+ selectedLabel . remove ( )
410
+ }
411
+ }
412
+ } )
390
413
391
414
}
392
415
//escape space in the selector
Original file line number Diff line number Diff line change @@ -25,9 +25,14 @@ <h3>Publications</h3>
25
25
< hr />
26
26
< h3 > Change log</ h3 >
27
27
< br />
28
+ < h5 > Version 0.7.6.2 (dev)</ h5 >
29
+ < ul >
30
+ < li > Addition of a toggle action to show/hide node labels
31
+ < li > Addition of a description to the database selection
32
+ </ ul >
28
33
< h5 > Version 0.7.6.1 (2019-01-18)</ h5 >
29
34
< ul >
30
- < li > Addition of a help section on the functree explorer page, and improvement of the main documentation.
35
+ < li > Addition of a help section on the Functree explorer page, and improvement of the main documentation.
31
36
</ ul >
32
37
< h5 > Version 0.7.6 (2019-01-15)</ h5 >
33
38
< ul >
You can’t perform that action at this time.
0 commit comments