Skip to content

Commit d36364c

Browse files
committed
ensure z is not added to subplots multiple times
1 parent f2ad1ec commit d36364c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/plots/cartesian/index.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,9 @@ exports.plot = function(gd, traces, transitionOpts, makeOnCompleteCallback) {
154154
var subplotInfo = fullLayout._plots[subplot];
155155

156156
if(z > 0) {
157-
var idWithZ = subplotInfo.id + zindexSeparator + (z + 1);
157+
var idWithZ = subplotInfo.id;
158+
if(idWithZ.indexOf(zindexSeparator) !== -1) continue;
159+
idWithZ += zindexSeparator + (z + 1);
158160
subplotInfo = Lib.extendFlat({}, subplotInfo, {
159161
id: idWithZ,
160162
plot: fullLayout._cartesianlayer.selectAll('.subplot').select('.' + idWithZ)

0 commit comments

Comments
 (0)