@@ -195,25 +195,25 @@ function plotOne(gd, plotinfo, cdSubplot, transitionOpts, makeOnCompleteCallback
195195 var modules = fullLayout . _modules ;
196196 var _module , cdModuleAndOthers , cdModule ;
197197
198- // Separate traces by zindex and plot each zindex group separately
198+ // Separate traces by zorder and plot each zorder group separately
199199 // TODO: Performance
200- var traceZindexGroups = { } ;
200+ var traceZorderGroups = { } ;
201201 for ( var t = 0 ; t < cdSubplot . length ; t ++ ) {
202202 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 ] ) ;
206206 }
207207
208208 var layerData = [ ] ;
209209 var zoomScaleQueryParts = [ ] ;
210210
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 )
213213 . map ( Number )
214214 . sort ( Lib . sorterAsc ) ;
215215 for ( var z = 0 ; z < zindices . length ; z ++ ) {
216- var zindex = zindices [ z ] ;
216+ var zorder = zindices [ z ] ;
217217 // For each "module" (trace type)
218218 for ( var i = 0 ; i < modules . length ; i ++ ) {
219219 _module = modules [ i ] ;
@@ -225,7 +225,7 @@ function plotOne(gd, plotinfo, cdSubplot, transitionOpts, makeOnCompleteCallback
225225 var plotMethod = _module . plot ;
226226
227227 // plot all visible traces of this type on this subplot at once
228- cdModuleAndOthers = getModuleCalcData ( cdSubplot , plotMethod , zindex ) ;
228+ cdModuleAndOthers = getModuleCalcData ( cdSubplot , plotMethod , zorder ) ;
229229 cdModule = cdModuleAndOthers [ 0 ] ;
230230 // don't need to search the found traces again - in fact we need to NOT
231231 // 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
234234 if ( cdModule . length ) {
235235 layerData . push ( {
236236 i : traceLayerClasses . indexOf ( className ) ,
237- zindex : z ,
237+ zorder : z ,
238238 className : className ,
239239 plotMethod : plotMethod ,
240240 cdModule : cdModule
@@ -248,7 +248,7 @@ function plotOne(gd, plotinfo, cdSubplot, transitionOpts, makeOnCompleteCallback
248248 }
249249 }
250250 // 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 ; } ) ;
252252
253253 var layers = plotinfo . plot . selectAll ( 'g.mlayer' )
254254 . data ( layerData , function ( d ) { return d . className ; } ) ;
0 commit comments