@@ -1010,10 +1010,10 @@ function createHoverText(hoverData, opts, gd) {
1010
1010
} ;
1011
1011
var mockLayoutOut = { } ;
1012
1012
legendSupplyDefaults ( mockLayoutIn , mockLayoutOut , gd . _fullData ) ;
1013
- var legendOpts = mockLayoutOut . legend ;
1013
+ var mockLegend = mockLayoutOut . legend ;
1014
1014
1015
1015
// prepare items for the legend
1016
- legendOpts . entries = [ ] ;
1016
+ mockLegend . entries = [ ] ;
1017
1017
for ( var j = 0 ; j < hoverData . length ; j ++ ) {
1018
1018
var texts = getHoverLabelText ( hoverData [ j ] , true , hovermode , fullLayout , t0 ) ;
1019
1019
var text = texts [ 0 ] ;
@@ -1039,13 +1039,14 @@ function createHoverText(hoverData, opts, gd) {
1039
1039
}
1040
1040
pt . _distinct = true ;
1041
1041
1042
- legendOpts . entries . push ( [ pt ] ) ;
1042
+ mockLegend . entries . push ( [ pt ] ) ;
1043
1043
}
1044
- legendOpts . entries . sort ( function ( a , b ) { return a [ 0 ] . trace . index - b [ 0 ] . trace . index ; } ) ;
1045
- legendOpts . layer = container ;
1044
+ mockLegend . entries . sort ( function ( a , b ) { return a [ 0 ] . trace . index - b [ 0 ] . trace . index ; } ) ;
1045
+ mockLegend . layer = container ;
1046
1046
1047
1047
// Draw unified hover label
1048
- legendDraw ( gd , legendOpts ) ;
1048
+ mockLegend . _inHover = true ;
1049
+ legendDraw ( gd , mockLegend ) ;
1049
1050
1050
1051
// Position the hover
1051
1052
var ly = Lib . mean ( hoverData . map ( function ( c ) { return ( c . y0 + c . y1 ) / 2 ; } ) ) ;
0 commit comments