File tree 2 files changed +13
-1
lines changed 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -102,7 +102,7 @@ function render(scene) {
102
102
if ( isHoverinfoAll || hoverinfoParts . indexOf ( 'norm' ) !== - 1 ) {
103
103
vectorTx . push ( 'norm: ' + selection . traceCoordinate [ 6 ] . toPrecision ( 3 ) ) ;
104
104
}
105
- if ( isHoverinfoAll || hoverinfoParts . indexOf ( 'divergence' ) !== - 1 ) {
105
+ if ( trace . type === 'streamtube' && ( isHoverinfoAll || hoverinfoParts . indexOf ( 'divergence' ) !== - 1 ) ) {
106
106
vectorTx . push ( 'divergence: ' + selection . traceCoordinate [ 7 ] . toPrecision ( 3 ) ) ;
107
107
}
108
108
if ( selection . textLabel ) {
Original file line number Diff line number Diff line change @@ -261,6 +261,18 @@ describe('@gl Test cone interactions', function() {
261
261
assertHoverLabelContent ( {
262
262
nums : [ 'u: 0' , 'v: 3' , 'w: 0' ] . join ( '\n' )
263
263
} ) ;
264
+
265
+ return Plotly . restyle ( gd , 'hoverinfo' , 'all' ) ;
266
+ } )
267
+ . then ( function ( ) {
268
+ assertHoverLabelContent ( {
269
+ name : 'trace 0' ,
270
+ nums : [
271
+ 'x: 2' , 'y: 2' , 'z: 2' ,
272
+ 'u: 0' , 'v: 3' , 'w: 0' ,
273
+ 'norm: 3.00'
274
+ ] . join ( '\n' )
275
+ } ) ;
264
276
} )
265
277
. catch ( failTest )
266
278
. then ( done ) ;
You can’t perform that action at this time.
0 commit comments