Skip to content

Commit 442e3b1

Browse files
committed
quick fix - allow relayout array elements
1 parent ab193b2 commit 442e3b1

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/plot_api/plot_api.js

+4-3
Original file line numberDiff line numberDiff line change
@@ -1961,6 +1961,7 @@ function _relayout(gd, aobj) {
19611961
else {
19621962
// check whether we can short-circuit a full redraw
19631963
// 3d or geo at this point just needs to redraw.
1964+
var pp1 = String(p.parts[1] || '');
19641965
if(p.parts[0].indexOf('scene') === 0) flags.doplot = true;
19651966
else if(p.parts[0].indexOf('geo') === 0) flags.doplot = true;
19661967
else if(p.parts[0].indexOf('ternary') === 0) flags.doplot = true;
@@ -1973,17 +1974,17 @@ function _relayout(gd, aobj) {
19731974
else if(ai.indexOf('title') !== -1) flags.doticks = true;
19741975
else if(p.parts[0].indexOf('bgcolor') !== -1) flags.dolayoutstyle = true;
19751976
else if(p.parts.length > 1 &&
1976-
Lib.containsAny(p.parts[1], ['tick', 'exponent', 'grid', 'zeroline'])) {
1977+
Lib.containsAny(pp1, ['tick', 'exponent', 'grid', 'zeroline'])) {
19771978
flags.doticks = true;
19781979
}
19791980
else if(ai.indexOf('.linewidth') !== -1 &&
19801981
ai.indexOf('axis') !== -1) {
19811982
flags.doticks = flags.dolayoutstyle = true;
19821983
}
1983-
else if(p.parts.length > 1 && p.parts[1].indexOf('line') !== -1) {
1984+
else if(p.parts.length > 1 && pp1.indexOf('line') !== -1) {
19841985
flags.dolayoutstyle = true;
19851986
}
1986-
else if(p.parts.length > 1 && p.parts[1] === 'mirror') {
1987+
else if(p.parts.length > 1 && pp1 === 'mirror') {
19871988
flags.doticks = flags.dolayoutstyle = true;
19881989
}
19891990
else if(ai === 'margin.pad') {

0 commit comments

Comments
 (0)