Skip to content

Commit 158cdb9

Browse files
committed
lint in contour calc
1 parent 826ed94 commit 158cdb9

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

src/traces/contour/calc.js

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,21 +13,25 @@ var Axes = require('../../plots/cartesian/axes');
1313
var heatmapCalc = require('../heatmap/calc');
1414

1515

16+
// most is the same as heatmap calc, then adjust it
17+
// though a few things inside heatmap calc still look for
18+
// contour maps, because the makeBoundArray calls are too entangled
1619
module.exports = function calc(gd, trace) {
17-
// most is the same as heatmap calc, then adjust it
18-
// though a few things inside heatmap calc still look for
19-
// contour maps, because the makeBoundArray calls are too entangled
2020
var cd = heatmapCalc(gd, trace),
2121
contours = trace.contours;
2222

2323
// check if we need to auto-choose contour levels
24-
if(trace.autocontour!==false) {
24+
if(trace.autocontour !== false) {
2525
var dummyAx = {
2626
type: 'linear',
2727
range: [trace.zmin, trace.zmax]
2828
};
29-
Axes.autoTicks(dummyAx,
30-
(trace.zmax - trace.zmin) / (trace.ncontours||15));
29+
30+
Axes.autoTicks(
31+
dummyAx,
32+
(trace.zmax - trace.zmin) / (trace.ncontours || 15)
33+
);
34+
3135
contours.start = Axes.tickFirst(dummyAx);
3236
contours.size = dummyAx.dtick;
3337
dummyAx.range.reverse();
@@ -37,7 +41,7 @@ module.exports = function calc(gd, trace) {
3741
if(contours.end === trace.zmax) contours.end -= contours.size;
3842

3943
// so rounding errors don't cause us to miss the last contour
40-
contours.end += contours.size/100;
44+
contours.end += contours.size / 100;
4145

4246
// copy auto-contour info back to the source data.
4347
trace._input.contours = contours;

0 commit comments

Comments
 (0)