Skip to content

Commit 75e8910

Browse files
committed
improve code readability
1 parent ee222d5 commit 75e8910

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Diff for: src/components/colorscale/calc.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ var flipScale = require('./flip_scale');
1515

1616

1717
module.exports = function calc(gd, trace, opts) {
18+
var fullLayout = gd._fullLayout;
1819
var vals = opts.vals;
1920
var containerStr = opts.containerStr;
2021
var cLetter = opts.cLetter;
@@ -86,8 +87,8 @@ module.exports = function calc(gd, trace, opts) {
8687
doUpdate(autoAttr, (auto !== false || (min === undefined && max === undefined)));
8788

8889
if(container.autocolorscale) {
89-
if(min * max < 0) scl = gd._fullLayout.colorscale.diverging;
90-
else if(min >= 0) scl = gd._fullLayout.colorscale.sequential;
90+
if(min * max < 0) scl = fullLayout.colorscale.diverging;
91+
else if(min >= 0) scl = fullLayout.colorscale.sequential;
9192
else scl = gd._fullLayout.colorscale.sequentialminus;
9293

9394
// reversescale is handled at the containerOut level

0 commit comments

Comments
 (0)