@@ -93,7 +93,6 @@ class NetJSONGraphRender {
9393 "click" ,
9494 ( params ) => {
9595 const clickElement = configs . onClickElement . bind ( self ) ;
96- self . utils . setUrlFragments ( self , params ) ;
9796 if ( params . componentSubType === "graph" ) {
9897 return clickElement (
9998 params . dataType === "edge" ? "link" : "node" ,
@@ -103,6 +102,7 @@ class NetJSONGraphRender {
103102 if ( params . componentSubType === "graphGL" ) {
104103 return clickElement ( "node" , params . data ) ;
105104 }
105+ self . utils . setUrlFragments ( self , params ) ;
106106 return params . componentSubType === "lines"
107107 ? clickElement ( "link" , params . data . link )
108108 : ! params . data . cluster && clickElement ( "node" , params . data . node ) ;
@@ -144,6 +144,7 @@ class NetJSONGraphRender {
144144 // Preserve original NetJSON node for sidebar use
145145 /* eslint-disable no-underscore-dangle */
146146 nodeResult . _source = JSON . parse ( JSON . stringify ( node ) ) ;
147+ // Store the clicked node in this.selectedNode for easy access later without need for traverse
147148 self . utils . setSelectedNodeFromUrlFragments ( self , fragments , node ) ;
148149 return nodeResult ;
149150 } ) ;
@@ -244,6 +245,7 @@ class NetJSONGraphRender {
244245 } ) ;
245246 }
246247 }
248+ // Store the clicked node in this.selectedNode for easy access later without need for traverse
247249 self . utils . setSelectedNodeFromUrlFragments ( self , fragments , node ) ;
248250 } ) ;
249251 links . forEach ( ( link ) => {
0 commit comments