File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -568,7 +568,10 @@ function makeSubplotLayer(gd, plotinfo) {
568568 var yLayer = constants . layerValue2layerClass [ plotinfo . yaxis . layer ] ;
569569 var hasOnlyLargeSploms = fullLayout . _hasOnlyLargeSploms ;
570570
571- if ( ! plotinfo . mainplot || fullLayout . _zindices . length > 1 ) {
571+ var hasMultipleZ = fullLayout . _zindices . length > 1 ;
572+ var mainplotinfo = plotinfo . mainplotinfo ;
573+
574+ if ( ! plotinfo . mainplot || hasMultipleZ ) {
572575 if ( hasOnlyLargeSploms ) {
573576 // TODO could do even better
574577 // - we don't need plot (but we would have to mock it in lsInner
@@ -622,17 +625,14 @@ function makeSubplotLayer(gd, plotinfo) {
622625 }
623626 }
624627
625- if ( fullLayout . _zindices . length > 1 ) {
626- var mainplotinfo = plotinfo . mainplotinfo ;
628+ if ( hasMultipleZ ) {
627629 if ( mainplotinfo ) {
628630 plotinfo . minorGridlayer = mainplotinfo . minorGridlayer ;
629631 plotinfo . gridlayer = mainplotinfo . gridlayer ;
630632 plotinfo . zerolinelayer = mainplotinfo . zerolinelayer ;
631633 }
632634 }
633-
634635 } else {
635- var mainplotinfo = plotinfo . mainplotinfo ;
636636 var mainplotgroup = mainplotinfo . plotgroup ;
637637 var xId = id + '-x' ;
638638 var yId = id + '-y' ;
You can’t perform that action at this time.
0 commit comments