@@ -854,9 +854,8 @@ Plotly.newPlot = function(gd, data, layout, config) {
854
854
function doCalcdata ( gd ) {
855
855
var axList = Plotly . Axes . list ( gd ) ,
856
856
fullData = gd . _fullData ,
857
- fullLayout = gd . _fullLayout ;
858
-
859
- var i , trace , module , cd ;
857
+ fullLayout = gd . _fullLayout ,
858
+ i ;
860
859
861
860
var calcdata = gd . calcdata = new Array ( fullData . length ) ;
862
861
@@ -882,12 +881,12 @@ function doCalcdata(gd) {
882
881
}
883
882
884
883
for ( i = 0 ; i < fullData . length ; i ++ ) {
885
- trace = fullData [ i ] ;
886
- module = trace . _module ;
887
- cd = [ ] ;
884
+ var trace = fullData [ i ] ,
885
+ _module = trace . _module ,
886
+ cd = [ ] ;
888
887
889
- if ( module && trace . visible === true ) {
890
- if ( module . calc ) cd = module . calc ( gd , trace ) ;
888
+ if ( _module && trace . visible === true ) {
889
+ if ( _module . calc ) cd = _module . calc ( gd , trace ) ;
891
890
}
892
891
893
892
// make sure there is a first point
@@ -901,7 +900,7 @@ function doCalcdata(gd) {
901
900
if ( ! cd [ 0 ] . t ) cd [ 0 ] . t = { } ;
902
901
cd [ 0 ] . trace = trace ;
903
902
904
- Lib . markTime ( 'done with calcdata for ' + i ) ;
903
+ Lib . markTime ( 'done with calcdata for ' + i ) ;
905
904
calcdata [ i ] = cd ;
906
905
}
907
906
}
@@ -1564,7 +1563,7 @@ Plotly.restyle = function restyle(gd, astr, val, traces) {
1564
1563
1565
1564
if ( Object . keys ( aobj ) . length ) gd . changed = true ;
1566
1565
1567
- if ( isNumeric ( traces ) ) traces = [ traces ] ;
1566
+ if ( isNumeric ( traces ) ) traces = [ traces ] ;
1568
1567
else if ( ! Array . isArray ( traces ) || ! traces . length ) {
1569
1568
traces = gd . _fullData . map ( function ( v , i ) { return i ; } ) ;
1570
1569
}
0 commit comments