@@ -1029,10 +1029,10 @@ function createHoverText(hoverData, opts, gd) {
1029
1029
} ;
1030
1030
var mockLayoutOut = { } ;
1031
1031
legendSupplyDefaults ( mockLayoutIn , mockLayoutOut , gd . _fullData ) ;
1032
- var legendOpts = mockLayoutOut . legend ;
1032
+ var mockLegend = mockLayoutOut . legend ;
1033
1033
1034
1034
// prepare items for the legend
1035
- legendOpts . entries = [ ] ;
1035
+ mockLegend . entries = [ ] ;
1036
1036
for ( var j = 0 ; j < hoverData . length ; j ++ ) {
1037
1037
var texts = getHoverLabelText ( hoverData [ j ] , true , hovermode , fullLayout , t0 ) ;
1038
1038
var text = texts [ 0 ] ;
@@ -1058,13 +1058,14 @@ function createHoverText(hoverData, opts, gd) {
1058
1058
}
1059
1059
pt . _distinct = true ;
1060
1060
1061
- legendOpts . entries . push ( [ pt ] ) ;
1061
+ mockLegend . entries . push ( [ pt ] ) ;
1062
1062
}
1063
- legendOpts . entries . sort ( function ( a , b ) { return a [ 0 ] . trace . index - b [ 0 ] . trace . index ; } ) ;
1064
- legendOpts . layer = container ;
1063
+ mockLegend . entries . sort ( function ( a , b ) { return a [ 0 ] . trace . index - b [ 0 ] . trace . index ; } ) ;
1064
+ mockLegend . layer = container ;
1065
1065
1066
1066
// Draw unified hover label
1067
- legendDraw ( gd , legendOpts ) ;
1067
+ mockLegend . _inHover = true ;
1068
+ legendDraw ( gd , mockLegend ) ;
1068
1069
1069
1070
// Position the hover
1070
1071
var ly = Lib . mean ( hoverData . map ( function ( c ) { return ( c . y0 + c . y1 ) / 2 ; } ) ) ;
0 commit comments