@@ -525,8 +525,21 @@ describe('@noCI Test choroplethmapbox hover:', function() {
525
525
setTimeout ( done , 200 ) ;
526
526
} ) ;
527
527
528
- function run ( s , done ) {
528
+ function transformPlot ( gd , transformString ) {
529
+ gd . style . webkitTransform = transformString ;
530
+ gd . style . MozTransform = transformString ;
531
+ gd . style . msTransform = transformString ;
532
+ gd . style . OTransform = transformString ;
533
+ gd . style . transform = transformString ;
534
+ }
535
+
536
+ function run ( hasCssTransform , s , done ) {
529
537
gd = createGraphDiv ( ) ;
538
+ var scale = 1 ;
539
+ if ( hasCssTransform ) {
540
+ scale = 0.5 ;
541
+ transformPlot ( gd , 'translate(-25%, -25%) scale(0.5)' ) ;
542
+ }
530
543
531
544
var fig = Lib . extendDeep ( { } ,
532
545
s . mock || require ( '@mocks/mapbox_choropleth0.json' )
@@ -569,7 +582,7 @@ describe('@noCI Test choroplethmapbox hover:', function() {
569
582
setTimeout ( done , 0 ) ;
570
583
} ) ;
571
584
572
- mouseEvent ( 'mousemove' , pos [ 0 ] , pos [ 1 ] ) ;
585
+ mouseEvent ( 'mousemove' , scale * pos [ 0 ] , scale * pos [ 1 ] ) ;
573
586
} )
574
587
. catch ( failTest ) ;
575
588
}
@@ -631,8 +644,10 @@ describe('@noCI Test choroplethmapbox hover:', function() {
631
644
} ] ;
632
645
633
646
specs . forEach ( function ( s ) {
634
- it ( '@gl should generate correct hover labels ' + s . desc , function ( done ) {
635
- run ( s , done ) ;
647
+ [ false , true ] . forEach ( function ( hasCssTransform ) {
648
+ it ( '@gl should generate correct hover labels ' + s . desc + ', hasCssTransform: ' + hasCssTransform , function ( done ) {
649
+ run ( hasCssTransform , s , done ) ;
650
+ } ) ;
636
651
} ) ;
637
652
} ) ;
638
653
} ) ;
0 commit comments