@@ -195,25 +195,25 @@ function plotOne(gd, plotinfo, cdSubplot, transitionOpts, makeOnCompleteCallback
195
195
var modules = fullLayout . _modules ;
196
196
var _module , cdModuleAndOthers , cdModule ;
197
197
198
- // Separate traces by zindex and plot each zindex group separately
198
+ // Separate traces by zorder and plot each zorder group separately
199
199
// TODO: Performance
200
- var traceZindexGroups = { } ;
200
+ var traceZorderGroups = { } ;
201
201
for ( var t = 0 ; t < cdSubplot . length ; t ++ ) {
202
202
var trace = cdSubplot [ t ] [ 0 ] . trace ;
203
- var zi = trace . zindex || 0 ;
204
- if ( ! traceZindexGroups [ zi ] ) traceZindexGroups [ zi ] = [ ] ;
205
- traceZindexGroups [ zi ] . push ( cdSubplot [ t ] ) ;
203
+ var zi = trace . zorder || 0 ;
204
+ if ( ! traceZorderGroups [ zi ] ) traceZorderGroups [ zi ] = [ ] ;
205
+ traceZorderGroups [ zi ] . push ( cdSubplot [ t ] ) ;
206
206
}
207
207
208
208
var layerData = [ ] ;
209
209
var zoomScaleQueryParts = [ ] ;
210
210
211
- // Plot each zindex group in ascending order
212
- var zindices = Object . keys ( traceZindexGroups )
211
+ // Plot each zorder group in ascending order
212
+ var zindices = Object . keys ( traceZorderGroups )
213
213
. map ( Number )
214
214
. sort ( Lib . sorterAsc ) ;
215
215
for ( var z = 0 ; z < zindices . length ; z ++ ) {
216
- var zindex = zindices [ z ] ;
216
+ var zorder = zindices [ z ] ;
217
217
// For each "module" (trace type)
218
218
for ( var i = 0 ; i < modules . length ; i ++ ) {
219
219
_module = modules [ i ] ;
@@ -225,7 +225,7 @@ function plotOne(gd, plotinfo, cdSubplot, transitionOpts, makeOnCompleteCallback
225
225
var plotMethod = _module . plot ;
226
226
227
227
// plot all visible traces of this type on this subplot at once
228
- cdModuleAndOthers = getModuleCalcData ( cdSubplot , plotMethod , zindex ) ;
228
+ cdModuleAndOthers = getModuleCalcData ( cdSubplot , plotMethod , zorder ) ;
229
229
cdModule = cdModuleAndOthers [ 0 ] ;
230
230
// don't need to search the found traces again - in fact we need to NOT
231
231
// so that if two modules share the same plotter we don't double-plot
@@ -234,7 +234,7 @@ function plotOne(gd, plotinfo, cdSubplot, transitionOpts, makeOnCompleteCallback
234
234
if ( cdModule . length ) {
235
235
layerData . push ( {
236
236
i : traceLayerClasses . indexOf ( className ) ,
237
- zindex : z ,
237
+ zorder : z ,
238
238
className : className ,
239
239
plotMethod : plotMethod ,
240
240
cdModule : cdModule
@@ -248,7 +248,7 @@ function plotOne(gd, plotinfo, cdSubplot, transitionOpts, makeOnCompleteCallback
248
248
}
249
249
}
250
250
// Sort the layers primarily by z, then by i
251
- layerData . sort ( function ( a , b ) { return ( a . zindex || 0 ) - ( b . zindex || 0 ) || a . i - b . i ; } ) ;
251
+ layerData . sort ( function ( a , b ) { return ( a . zorder || 0 ) - ( b . zorder || 0 ) || a . i - b . i ; } ) ;
252
252
253
253
var layers = plotinfo . plot . selectAll ( 'g.mlayer' )
254
254
. data ( layerData , function ( d ) { return d . className ; } ) ;
0 commit comments