@@ -231,10 +231,6 @@ class App extends Component {
231231 } ) ;
232232 }
233233
234- handleNodeClick = ( ) => {
235- console . log ( this . state ) ;
236- } ;
237-
238234 render ( ) {
239235 return (
240236 < div className = "App" >
@@ -245,7 +241,12 @@ class App extends Component {
245241 < h2 className = "title" > React D3 Tree</ h2 >
246242 < h3 className = "title" > v{ version } </ h3 >
247243 < 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 >
249250 </ h3 >
250251 < h4 className = "prop" > Examples</ h4 >
251252 < div style = { { marginBottom : '5px' } } >
@@ -367,6 +368,15 @@ class App extends Component {
367368 />
368369 </ div >
369370
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+
370380 < div className = "prop-container" >
371381 < h4 className = "prop" > Collapse neighbor nodes</ h4 >
372382 < Switch
@@ -576,11 +586,11 @@ class App extends Component {
576586 < div ref = { tc => ( this . treeContainer = tc ) } className = "tree-container" >
577587 < Tree
578588 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+ // }
584594 rootNodeClassName = "demo-node"
585595 branchNodeClassName = "demo-node"
586596 orientation = { this . state . orientation }
@@ -599,9 +609,8 @@ class App extends Component {
599609 styles = { this . state . styles }
600610 shouldCollapseNeighborNodes = { this . state . shouldCollapseNeighborNodes }
601611 // 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 ) ;
605614 } }
606615 onNodeMouseOver = { ( ...args ) => {
607616 console . log ( 'onNodeMouseOver' , args ) ;
0 commit comments