@@ -816,6 +816,10 @@ function GraphD3(_selector: HTMLDivElement, _options: any): IGraphD3 {
816
816
if ( typeof options . onNodeClick === 'function' ) {
817
817
options . onNodeClick ( this , d , event )
818
818
}
819
+
820
+ if ( info ) {
821
+ updateInfo ( d )
822
+ }
819
823
} )
820
824
. on ( 'dblclick' , function onNodeDoubleClick ( event , d ) {
821
825
stickNode ( this , event , d )
@@ -843,10 +847,6 @@ function GraphD3(_selector: HTMLDivElement, _options: any): IGraphD3 {
843
847
. call ( zoom . translateTo as any , d . x , d . y ) , 10 )
844
848
} )
845
849
. on ( 'mouseenter' , function onNodeMouseEnter ( event , d ) {
846
- if ( info ) {
847
- updateInfo ( d )
848
- }
849
-
850
850
if ( typeof options . onNodeMouseEnter === 'function' ) {
851
851
options . onNodeMouseEnter ( this , d , event )
852
852
}
@@ -893,6 +893,10 @@ function GraphD3(_selector: HTMLDivElement, _options: any): IGraphD3 {
893
893
if ( typeof options . onNodeInfoClick === 'function' ) {
894
894
options . onNodeInfoClick ( this , d , event )
895
895
}
896
+
897
+ if ( info ) {
898
+ updateInfo ( d )
899
+ }
896
900
} )
897
901
898
902
g . append ( 'rect' )
@@ -985,7 +989,7 @@ function GraphD3(_selector: HTMLDivElement, _options: any): IGraphD3 {
985
989
options . onRelationshipDoubleClick ( this , d , event )
986
990
}
987
991
} )
988
- . on ( 'mouseenter ' , ( event , d ) => {
992
+ . on ( 'click ' , ( event , d ) => {
989
993
if ( info ) {
990
994
updateInfo ( d )
991
995
}
0 commit comments