Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2afeb7e

Browse files
committed
fix zorder on overlayed subplots case of multiple traces in each subplot
1 parent 811bcd3 commit 2afeb7e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/plots/cartesian/index.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -557,6 +557,7 @@ function makeSubplotData(gd) {
557557
}
558558

559559
function makeSubplotLayer(gd, plotinfo) {
560+
var fullLayout = gd._fullLayout;
560561
var plotgroup = plotinfo.plotgroup;
561562
var id = plotinfo.id;
562563

@@ -565,9 +566,9 @@ function makeSubplotLayer(gd, plotinfo) {
565566

566567
var xLayer = constants.layerValue2layerClass[plotinfo.xaxis.layer];
567568
var yLayer = constants.layerValue2layerClass[plotinfo.yaxis.layer];
568-
var hasOnlyLargeSploms = gd._fullLayout._hasOnlyLargeSploms;
569+
var hasOnlyLargeSploms = fullLayout._hasOnlyLargeSploms;
569570

570-
if(!plotinfo.mainplot) {
571+
if(!plotinfo.mainplot || fullLayout._zindices.length > 1) {
571572
if(hasOnlyLargeSploms) {
572573
// TODO could do even better
573574
// - we don't need plot (but we would have to mock it in lsInner

0 commit comments

Comments
 (0)