@@ -28,6 +28,8 @@ var assertElemInside = customAssertions.assertElemInside;
2828
2929var groupTitlesMock = require ( '../../image/mocks/legendgroup-titles' ) ;
3030
31+ var splomLogMock = require ( '../../image/mocks/splom_log' ) ;
32+
3133function touch ( path , options ) {
3234 var len = path . length ;
3335 Lib . clearThrottle ( ) ;
@@ -2554,6 +2556,45 @@ describe('hover on subplots when hoversameaxis is set to true and y hovermodes',
25542556 } ) ;
25552557} ) ;
25562558
2559+ describe ( 'splom hover on subplots when hoversameaxis is set to true and (x|y) hovermodes' , function ( ) {
2560+ 'use strict' ;
2561+
2562+ var mock = Lib . extendDeep ( { } , splomLogMock ) ;
2563+ mock . layout . hovermode = 'x' ;
2564+ mock . layout . hoversameaxis = true ;
2565+
2566+ var gd ;
2567+
2568+ beforeEach ( function ( done ) {
2569+ gd = createGraphDiv ( ) ;
2570+ Plotly . newPlot ( gd , mock ) . then ( done ) ;
2571+ } ) ;
2572+
2573+ afterEach ( destroyGraphDiv ) ;
2574+
2575+ it ( 'splom hoversameaxis: true' , function ( ) {
2576+ Lib . clearThrottle ( ) ;
2577+ Plotly . Fx . hover ( gd , { x : 200 , y : 200 } , 'xy' ) ;
2578+ expect ( gd . _hoverdata . length ) . toBe ( 3 ) ;
2579+ assertHoverLabelContent ( {
2580+ nums : [ '100' , '100k' ] ,
2581+ name : [ '' , '' ] ,
2582+ axis : '100'
2583+ } ) ;
2584+
2585+ Plotly . relayout ( gd , 'hovermode' , 'x unified' ) ;
2586+
2587+ Lib . clearThrottle ( ) ;
2588+ Plotly . Fx . hover ( gd , { x : 200 , y : 200 } , 'xy' ) ;
2589+ expect ( gd . _hoverdata . length ) . toBe ( 3 ) ;
2590+
2591+ Plotly . relayout ( gd , 'hovermode' , 'y unified' ) ;
2592+ Lib . clearThrottle ( ) ;
2593+ Plotly . Fx . hover ( gd , { x : 200 , y : 200 } , 'xy' ) ;
2594+ expect ( gd . _hoverdata . length ) . toBe ( 3 ) ;
2595+ } ) ;
2596+ } ) ;
2597+
25572598describe ( 'hover on many lines+bars' , function ( ) {
25582599 'use strict' ;
25592600
0 commit comments