@@ -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 ) ;
@@ -152,6 +152,7 @@ class NetJSONGraphRender {
152152 // Preserve original NetJSON node for sidebar use
153153 /* eslint-disable no-underscore-dangle */
154154 nodeResult . _source = JSON . parse ( JSON . stringify ( node ) ) ;
155+ // Store the clicked node in this.selectedNode for easy access later without need for traverse
155156 self . utils . setSelectedNodeFromUrlFragments ( self , fragments , node ) ;
156157 return nodeResult ;
157158 } ) ;
@@ -292,6 +293,7 @@ class NetJSONGraphRender {
292293 } ) ;
293294 }
294295 }
296+ // Store the clicked node in this.selectedNode for easy access later without need for traverse
295297 self . utils . setSelectedNodeFromUrlFragments ( self , fragments , node ) ;
296298 } ) ;
297299 links . forEach ( ( link ) => {
0 commit comments