File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed
Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -102,7 +102,7 @@ function render(scene) {
102102 if ( isHoverinfoAll || hoverinfoParts . indexOf ( 'norm' ) !== - 1 ) {
103103 vectorTx . push ( 'norm: ' + selection . traceCoordinate [ 6 ] . toPrecision ( 3 ) ) ;
104104 }
105- if ( isHoverinfoAll || hoverinfoParts . indexOf ( 'divergence' ) !== - 1 ) {
105+ if ( trace . type === 'streamtube' && ( isHoverinfoAll || hoverinfoParts . indexOf ( 'divergence' ) !== - 1 ) ) {
106106 vectorTx . push ( 'divergence: ' + selection . traceCoordinate [ 7 ] . toPrecision ( 3 ) ) ;
107107 }
108108 if ( selection . textLabel ) {
Original file line number Diff line number Diff line change @@ -261,6 +261,18 @@ describe('@gl Test cone interactions', function() {
261261 assertHoverLabelContent ( {
262262 nums : [ 'u: 0' , 'v: 3' , 'w: 0' ] . join ( '\n' )
263263 } ) ;
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+ } ) ;
264276 } )
265277 . catch ( failTest )
266278 . then ( done ) ;
You can’t perform that action at this time.
0 commit comments