Skip to content

Commit

Permalink
refactor - rename zindex which is not zorder
Browse files Browse the repository at this point in the history
  • Loading branch information
archmoj committed Sep 10, 2024
1 parent 8b7805d commit 7d8dc0a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/plots/cartesian/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ function plotOne(gd, plotinfo, cdSubplot, transitionOpts, makeOnCompleteCallback
if(cdModule.length) {
layerData.push({
i: traceLayerClasses.indexOf(classBaseName),
zorder: z,
zindex: z,
className: className,
plotMethod: plotMethod,
cdModule: cdModule
Expand All @@ -257,10 +257,10 @@ function plotOne(gd, plotinfo, cdSubplot, transitionOpts, makeOnCompleteCallback
}
}
}
// Sort the layers primarily by z, then by i
// Sort the layers primarily by zindex, then by i
layerData.sort(function(a, b) {
return (
(a.zorder || 0) - (b.zorder || 0) ||
(a.zindex || 0) - (b.zindex || 0) ||
(a.i - b.i)
);
});
Expand Down

0 comments on commit 7d8dc0a

Please sign in to comment.