From 222c89c96172b1ae84a647b6fcc10ed7edfffe9e Mon Sep 17 00:00:00 2001 From: archmoj Date: Sun, 9 Dec 2018 22:03:01 -0500 Subject: [PATCH 1/3] fix for issue 2873 --- src/components/colorscale/calc.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/colorscale/calc.js b/src/components/colorscale/calc.js index e887b6820cd..1f325e8ad22 100644 --- a/src/components/colorscale/calc.js +++ b/src/components/colorscale/calc.js @@ -33,7 +33,7 @@ module.exports = function calc(gd, trace, opts) { updateStyle(trace._input, containerStr ? (containerStr + '.' + attr) : attr, inputVal); } else { - inputContainer[attr] = inputVal; + trace._input[attr] = inputVal; } container[attr] = fullVal; From fe0a663e1e88de0de16331cf4df2560c99a53df4 Mon Sep 17 00:00:00 2001 From: archmoj Date: Sun, 9 Dec 2018 22:21:35 -0500 Subject: [PATCH 2/3] changes for scatter3d only --- src/components/colorscale/calc.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/components/colorscale/calc.js b/src/components/colorscale/calc.js index 1f325e8ad22..8980131c141 100644 --- a/src/components/colorscale/calc.js +++ b/src/components/colorscale/calc.js @@ -33,7 +33,12 @@ module.exports = function calc(gd, trace, opts) { updateStyle(trace._input, containerStr ? (containerStr + '.' + attr) : attr, inputVal); } else { - trace._input[attr] = inputVal; + if(trace._input.type === 'scatter3d') { + trace._input[attr] = inputVal; + } + else { + inputContainer[attr] = inputVal; + } } container[attr] = fullVal; From 5df7a23fc80a85b30841b1e4f3485c706a640943 Mon Sep 17 00:00:00 2001 From: archmoj Date: Thu, 13 Dec 2018 18:42:41 -0500 Subject: [PATCH 3/3] not get into container if undefined --- src/components/colorscale/calc.js | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/components/colorscale/calc.js b/src/components/colorscale/calc.js index 8980131c141..9b3b9de15e3 100644 --- a/src/components/colorscale/calc.js +++ b/src/components/colorscale/calc.js @@ -33,12 +33,7 @@ module.exports = function calc(gd, trace, opts) { updateStyle(trace._input, containerStr ? (containerStr + '.' + attr) : attr, inputVal); } else { - if(trace._input.type === 'scatter3d') { - trace._input[attr] = inputVal; - } - else { - inputContainer[attr] = inputVal; - } + inputContainer[attr] = inputVal; } container[attr] = fullVal; @@ -53,6 +48,8 @@ module.exports = function calc(gd, trace, opts) { } if(containerStr) { + if(inputContainer[containerStr] === undefined) return; + container = Lib.nestedProperty(container, containerStr).get(); inputContainer = Lib.nestedProperty(inputContainer, containerStr).get(); fullInputContainer = Lib.nestedProperty(fullInputContainer, containerStr).get() || {};