Skip to content

Commit 4a1901c

Browse files
committed
Change naming of layers with zindex
1 parent c2c268c commit 4a1901c

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/plots/cartesian/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ function plotOne(gd, plotinfo, cdSubplot, transitionOpts, makeOnCompleteCallback
221221
var categories = Registry.modules[name].categories;
222222

223223
if(categories.svg) {
224-
var className = (_module.layerName || name + 'layer') + (zindex ? '-' + z : '');
224+
var className = (_module.layerName || name + 'layer') + (zindex ? Number(z) + 1 : '');
225225
var plotMethod = _module.plot;
226226

227227
// plot all visible traces of this type on this subplot at once

test/image/mocks/zindex-scatter-image.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
"type": "scatter",
55
"y": ["E", "F", "G", "H"],
66
"x": ["A", "B", "C", "D"]
7-
}, {
7+
},
8+
{
89
"type": "image",
910
"zmax": [1, 1, 1],
1011
"x0": "B",

0 commit comments

Comments
 (0)