@@ -231,10 +231,6 @@ class App extends Component {
231
231
} ) ;
232
232
}
233
233
234
- handleNodeClick = ( ) => {
235
- console . log ( this . state ) ;
236
- } ;
237
-
238
234
render ( ) {
239
235
return (
240
236
< div className = "App" >
@@ -245,7 +241,12 @@ class App extends Component {
245
241
< h2 className = "title" > React D3 Tree</ h2 >
246
242
< h3 className = "title" > v{ version } </ h3 >
247
243
< h3 className = "title" >
248
- < a href = "/react-d3-tree/docs" > 📖 API Docs (v2)</ a >
244
+ < a href = "/react-d3-tree/docs" >
245
+ < span role = "img" aria-label = "open book emoji" >
246
+ 📖
247
+ </ span > { ' ' }
248
+ API Docs (v2)
249
+ </ a >
249
250
</ h3 >
250
251
< h4 className = "prop" > Examples</ h4 >
251
252
< div style = { { marginBottom : '5px' } } >
@@ -367,6 +368,15 @@ class App extends Component {
367
368
/>
368
369
</ div >
369
370
371
+ < div className = "prop-container" >
372
+ < h4 className = "prop" > Zoomable</ h4 >
373
+ < Switch
374
+ name = "zoomableBtn"
375
+ checked = { this . state . zoomable }
376
+ onChange = { this . toggleZoomable }
377
+ />
378
+ </ div >
379
+
370
380
< div className = "prop-container" >
371
381
< h4 className = "prop" > Collapse neighbor nodes</ h4 >
372
382
< Switch
@@ -576,11 +586,11 @@ class App extends Component {
576
586
< div ref = { tc => ( this . treeContainer = tc ) } className = "tree-container" >
577
587
< Tree
578
588
data = { this . state . data }
579
- renderCustomNodeElement = {
580
- this . state . renderCustomNodeElement
581
- ? rd3tProps => this . state . renderCustomNodeElement ( rd3tProps , this . state )
582
- : undefined
583
- }
589
+ // renderCustomNodeElement={
590
+ // this.state.renderCustomNodeElement
591
+ // ? rd3tProps => this.state.renderCustomNodeElement(rd3tProps, this.state)
592
+ // : undefined
593
+ // }
584
594
rootNodeClassName = "demo-node"
585
595
branchNodeClassName = "demo-node"
586
596
orientation = { this . state . orientation }
@@ -599,9 +609,8 @@ class App extends Component {
599
609
styles = { this . state . styles }
600
610
shouldCollapseNeighborNodes = { this . state . shouldCollapseNeighborNodes }
601
611
// onUpdate={(...args) => {console.log(args)}}
602
- onNodeClick = { ( ...args ) => {
603
- console . log ( 'onNodeClick' ) ;
604
- console . log ( args ) ;
612
+ onNodeClick = { ( node , evt ) => {
613
+ console . log ( 'onNodeClick' , node , evt ) ;
605
614
} }
606
615
onNodeMouseOver = { ( ...args ) => {
607
616
console . log ( 'onNodeMouseOver' , args ) ;
0 commit comments