@@ -132,10 +132,13 @@ module.exports = function plot(gd, calcData) {
132
132
var linkHover = function ( element , d , sankey ) {
133
133
if ( gd . _fullLayout . hovermode === false ) return ;
134
134
d3 . select ( element ) . call ( linkHoveredStyle . bind ( 0 , d , sankey , true ) ) ;
135
- gd . emit ( 'plotly_hover' , {
136
- event : d3 . event ,
137
- points : [ d . link ]
138
- } ) ;
135
+ if ( d . link . trace . hoverinfo !== 'skip' ) {
136
+ gd . emit ( 'plotly_hover' , {
137
+ event : d3 . event ,
138
+ points : [ d . link ]
139
+ } ) ;
140
+ }
141
+
139
142
} ;
140
143
141
144
var sourceLabel = _ ( gd , 'source:' ) + ' ' ;
@@ -146,6 +149,7 @@ module.exports = function plot(gd, calcData) {
146
149
var linkHoverFollow = function ( element , d ) {
147
150
if ( gd . _fullLayout . hovermode === false ) return ;
148
151
var trace = d . link . trace ;
152
+ if ( trace . hoverinfo === 'none' || trace . hoverinfo === 'skip' ) return ;
149
153
var rootBBox = gd . _fullLayout . _paperdiv . node ( ) . getBoundingClientRect ( ) ;
150
154
var boundingBox = element . getBoundingClientRect ( ) ;
151
155
var hoverCenterX = boundingBox . left + boundingBox . width / 2 ;
@@ -179,10 +183,12 @@ module.exports = function plot(gd, calcData) {
179
183
var linkUnhover = function ( element , d , sankey ) {
180
184
if ( gd . _fullLayout . hovermode === false ) return ;
181
185
d3 . select ( element ) . call ( linkNonHoveredStyle . bind ( 0 , d , sankey , true ) ) ;
182
- gd . emit ( 'plotly_unhover' , {
183
- event : d3 . event ,
184
- points : [ d . link ]
185
- } ) ;
186
+ if ( d . link . trace . hoverinfo !== 'skip' ) {
187
+ gd . emit ( 'plotly_unhover' , {
188
+ event : d3 . event ,
189
+ points : [ d . link ]
190
+ } ) ;
191
+ }
186
192
187
193
Fx . loneUnhover ( fullLayout . _hoverlayer . node ( ) ) ;
188
194
} ;
@@ -198,15 +204,19 @@ module.exports = function plot(gd, calcData) {
198
204
var nodeHover = function ( element , d , sankey ) {
199
205
if ( gd . _fullLayout . hovermode === false ) return ;
200
206
d3 . select ( element ) . call ( nodeHoveredStyle , d , sankey ) ;
201
- gd . emit ( 'plotly_hover' , {
202
- event : d3 . event ,
203
- points : [ d . node ]
204
- } ) ;
207
+ if ( d . node . trace . hoverinfo !== 'skip' ) {
208
+ gd . emit ( 'plotly_hover' , {
209
+ event : d3 . event ,
210
+ points : [ d . node ]
211
+ } ) ;
212
+ }
205
213
} ;
206
214
207
215
var nodeHoverFollow = function ( element , d ) {
208
216
if ( gd . _fullLayout . hovermode === false ) return ;
217
+
209
218
var trace = d . node . trace ;
219
+ if ( trace . hoverinfo === 'none' || trace . hoverinfo === 'skip' ) return ;
210
220
var nodeRect = d3 . select ( element ) . select ( '.' + cn . nodeRect ) ;
211
221
var rootBBox = gd . _fullLayout . _paperdiv . node ( ) . getBoundingClientRect ( ) ;
212
222
var boundingBox = nodeRect . node ( ) . getBoundingClientRect ( ) ;
@@ -243,10 +253,12 @@ module.exports = function plot(gd, calcData) {
243
253
var nodeUnhover = function ( element , d , sankey ) {
244
254
if ( gd . _fullLayout . hovermode === false ) return ;
245
255
d3 . select ( element ) . call ( nodeNonHoveredStyle , d , sankey ) ;
246
- gd . emit ( 'plotly_unhover' , {
247
- event : d3 . event ,
248
- points : [ d . node ]
249
- } ) ;
256
+ if ( d . node . trace . hoverinfo !== 'skip' ) {
257
+ gd . emit ( 'plotly_unhover' , {
258
+ event : d3 . event ,
259
+ points : [ d . node ]
260
+ } ) ;
261
+ }
250
262
251
263
Fx . loneUnhover ( fullLayout . _hoverlayer . node ( ) ) ;
252
264
} ;
0 commit comments