@@ -171,7 +171,7 @@ describe('Bar.supplyDefaults', function() {
171
171
} ) ;
172
172
} ) ;
173
173
174
- describe ( 'bar calc / setPositions' , function ( ) {
174
+ describe ( 'bar calc / crossTraceCalc (formerly known as setPositions) ' , function ( ) {
175
175
'use strict' ;
176
176
177
177
it ( 'should fill in calc pt fields (stack case)' , function ( ) {
@@ -337,7 +337,7 @@ describe('Bar.calc', function() {
337
337
} ) ;
338
338
} ) ;
339
339
340
- describe ( 'Bar.setPositions' , function ( ) {
340
+ describe ( 'Bar.crossTraceCalc (formerly known as setPositions) ' , function ( ) {
341
341
'use strict' ;
342
342
343
343
it ( 'should guard against invalid offset items' , function ( ) {
@@ -1347,9 +1347,9 @@ describe('bar visibility toggling:', function() {
1347
1347
expect ( fullLayout . xaxis . range ) . toBeCloseToArray ( xrng , 2 , msg + ' xrng' ) ;
1348
1348
expect ( fullLayout . yaxis . range ) . toBeCloseToArray ( yrng , 2 , msg + ' yrng' ) ;
1349
1349
1350
- var setPositions = gd . _fullData [ 0 ] . _module . setPositions ;
1351
- expect ( setPositions ) . toHaveBeenCalledTimes ( calls ) ;
1352
- setPositions . calls . reset ( ) ;
1350
+ var crossTraceCalc = gd . _fullData [ 0 ] . _module . crossTraceCalc ;
1351
+ expect ( crossTraceCalc ) . toHaveBeenCalledTimes ( calls ) ;
1352
+ crossTraceCalc . calls . reset ( ) ;
1353
1353
}
1354
1354
1355
1355
it ( 'should update axis range according to visible edits (group case)' , function ( done ) {
@@ -1358,7 +1358,7 @@ describe('bar visibility toggling:', function() {
1358
1358
{ type : 'bar' , x : [ 1 , 2 , 3 ] , y : [ - 1 , - 2 , - 1 ] }
1359
1359
] )
1360
1360
. then ( function ( ) {
1361
- spyOn ( gd . _fullData [ 0 ] . _module , 'setPositions ' ) . and . callThrough ( ) ;
1361
+ spyOn ( gd . _fullData [ 0 ] . _module , 'crossTraceCalc ' ) . and . callThrough ( ) ;
1362
1362
1363
1363
_assert ( 'base' , [ 0.5 , 3.5 ] , [ - 2.222 , 2.222 ] , 0 ) ;
1364
1364
return Plotly . restyle ( gd , 'visible' , false , [ 1 ] ) ;
@@ -1388,7 +1388,7 @@ describe('bar visibility toggling:', function() {
1388
1388
{ type : 'bar' , x : [ 1 , 2 , 3 ] , y : [ 2 , 3 , 2 ] }
1389
1389
] , { barmode : 'stack' } )
1390
1390
. then ( function ( ) {
1391
- spyOn ( gd . _fullData [ 0 ] . _module , 'setPositions ' ) . and . callThrough ( ) ;
1391
+ spyOn ( gd . _fullData [ 0 ] . _module , 'crossTraceCalc ' ) . and . callThrough ( ) ;
1392
1392
1393
1393
_assert ( 'base' , [ 0.5 , 3.5 ] , [ 0 , 5.263 ] , 0 ) ;
1394
1394
return Plotly . restyle ( gd , 'visible' , false , [ 1 ] ) ;
@@ -1806,8 +1806,8 @@ function mockBarPlot(dataWithoutTraceType, layout) {
1806
1806
yaxis : gd . _fullLayout . yaxis
1807
1807
} ;
1808
1808
1809
- // call Bar.setPositions
1810
- Bar . setPositions ( gd , plotinfo ) ;
1809
+ // call Bar.crossTraceCalc
1810
+ Bar . crossTraceCalc ( gd , plotinfo ) ;
1811
1811
1812
1812
return gd ;
1813
1813
}
0 commit comments