@@ -1652,13 +1652,13 @@ describe('Polar plots with css transforms', function() {
1652
1652
} ) ;
1653
1653
}
1654
1654
1655
- function _getVisiblePointsData ( gd ) {
1655
+ function _getVisiblePointsData ( ) {
1656
1656
return Array . from (
1657
- document . querySelectorAll ( '.point' ) . entries ( ) ,
1658
- ( [ key , value ] ) => value ,
1657
+ document . querySelectorAll ( '.point' ) . entries ( ) ,
1658
+ function ( e ) { return e [ 1 ] ; }
1659
1659
)
1660
- . filter ( e => window . getComputedStyle ( e ) . display !== 'none' )
1661
- . map ( e => e . __data__ ) ;
1660
+ . filter ( function ( e ) { return window . getComputedStyle ( e ) . display !== 'none' ; } )
1661
+ . map ( function ( e ) { return e . __data__ ; } ) ;
1662
1662
}
1663
1663
1664
1664
var rVals = [ 100 , 50 , 50 , 100 ] ;
@@ -1707,37 +1707,36 @@ describe('Polar plots with css transforms', function() {
1707
1707
. catch ( failTest )
1708
1708
. then ( done ) ;
1709
1709
} ) ;
1710
-
1711
- it ( `drag-zoom behaves correctly after css transform: ${ transform } ` , function ( done ) {
1712
-
1710
+
1711
+ it ( 'drag-zoom behaves correctly after css transform: ' + transform , function ( done ) {
1713
1712
Plotly . plot ( gd , Lib . extendDeep ( { } , mock ) )
1714
1713
. then ( function ( ) {
1715
1714
transformPlot ( gd , transform ) ;
1716
1715
recalculateInverse ( gd ) ;
1717
1716
} )
1718
- . then ( function ( ) {
1717
+ . then ( function ( ) {
1719
1718
return _drag ( [ 30 , 30 ] , [ 50 , 50 ] ) ;
1720
1719
} )
1721
1720
. then ( function ( ) {
1722
- var points = _getVisiblePointsData ( gd ) ;
1721
+ var points = _getVisiblePointsData ( ) ;
1723
1722
expect ( points . length ) . toBe ( 2 ) ;
1724
1723
expect ( points [ 0 ] . i ) . toBe ( 0 ) ;
1725
1724
expect ( points [ 1 ] . i ) . toBe ( 3 ) ;
1726
1725
} )
1727
1726
. catch ( failTest )
1728
1727
. then ( done ) ;
1729
1728
} ) ;
1730
-
1731
- it ( `select behaves correctly after css transform: ${ transform } ` , function ( done ) {
1732
-
1729
+
1730
+ it ( 'select behaves correctly after css transform: ' + transform , function ( done ) {
1733
1731
function _assertSelected ( expectation ) {
1734
1732
var data = gd . _fullData [ 0 ] ;
1735
1733
var points = data . selectedpoints ;
1736
1734
expect ( typeof ( points ) !== 'undefined' ) . toBeTrue ( ) ;
1737
- if ( expectation . numPoints )
1735
+ if ( expectation . numPoints ) {
1738
1736
expect ( points . length ) . toBe ( expectation . numPoints ) ;
1737
+ }
1739
1738
}
1740
-
1739
+
1741
1740
Plotly . plot ( gd , Lib . extendDeep ( { } , mock ) )
1742
1741
. then ( function ( ) {
1743
1742
transformPlot ( gd , transform ) ;
@@ -1746,7 +1745,7 @@ describe('Polar plots with css transforms', function() {
1746
1745
. then ( function ( ) {
1747
1746
return Plotly . relayout ( gd , 'dragmode' , 'select' ) ;
1748
1747
} )
1749
- . then ( function ( ) { return _drag ( [ 30 , 30 ] , [ 130 , 130 ] ) } )
1748
+ . then ( function ( ) { return _drag ( [ 30 , 30 ] , [ 130 , 130 ] ) ; } )
1750
1749
. then ( function ( ) {
1751
1750
_assertSelected ( { numPoints : 3 } ) ;
1752
1751
} )
0 commit comments