Skip to content

Commit be8a250

Browse files
committed
Automatic lint fixes
1 parent eeba96d commit be8a250

File tree

6 files changed

+59
-59
lines changed

6 files changed

+59
-59
lines changed

src/plots/smith/set_convert.js

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -59,28 +59,28 @@ function setConvertReal(ax, polarLayout) {
5959
var subplot = polarLayout._subplot;
6060
var radius = subplot.radius;
6161

62-
ax.setGeometry = function () {
63-
ax.c2g = function(v) {
64-
var sq = function (x) { return x * x; };
65-
var gammaX = function(re) {
66-
var denom = sq(re + 1.0);
67-
var result = (sq(re) - 1.0) / denom;
68-
return result;
69-
}
62+
ax.setGeometry = function() {
63+
ax.c2g = function(v) {
64+
var sq = function(x) { return x * x; };
65+
var gammaX = function(re) {
66+
var denom = sq(re + 1.0);
67+
var result = (sq(re) - 1.0) / denom;
68+
return result;
69+
};
7070
// console.log(v, gammaX(v));
7171

72-
return gammaX(v);
73-
};
72+
return gammaX(v);
73+
};
7474

75-
ax.g2c = function(v) {
76-
return (v + 1.0) / (1.0 - v);
77-
};
75+
ax.g2c = function(v) {
76+
return (v + 1.0) / (1.0 - v);
77+
};
7878

79-
ax.g2p = function(v) {
80-
return v * radius;
81-
};
79+
ax.g2p = function(v) {
80+
return v * radius;
81+
};
8282

83-
ax.c2p = function(v) { return ax.g2p(ax.c2g(v)); };
83+
ax.c2p = function(v) { return ax.g2p(ax.c2g(v)); };
8484
};
8585
}
8686

src/plots/smith/smith.js

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -240,14 +240,14 @@ proto.updateLayout = function(fullLayout, polarLayout) {
240240
var cyy = _this.cyy = cy - yOffset2;
241241

242242
_this.radialAxis = _this.mockAxis(fullLayout, polarLayout, radialLayout, {
243-
_id: 'realaxis',
243+
_id: 'realaxis',
244244
side: {
245245
counterclockwise: 'top',
246246
clockwise: 'bottom'
247247
}[radialLayout.side],
248248
// keep track of real side
249249
_realSide: radialLayout.side,
250-
domain: [0, 100]
250+
domain: [0, 100]
251251
});
252252

253253
// _this.radialAxis = _this.mockAxis(fullLayout, polarLayout, radialLayout, {
@@ -395,7 +395,7 @@ proto.updateRadialAxis = function(fullLayout, polarLayout) {
395395

396396
// set special grid path function
397397
var gridPathFn = function(d) {
398-
var value = d.x
398+
var value = d.x;
399399

400400
var gridRadius = 0.5 * (_this.radius - ax.c2p(value));
401401
var gridCenter = gridRadius + ax.c2p(value);
@@ -413,19 +413,19 @@ proto.updateRadialAxis = function(fullLayout, polarLayout) {
413413
var labelFns = {};
414414

415415
labelFns.xFn = function(d) {
416-
return 0;
416+
return 0;
417417
};
418418

419419
labelFns.yFn = function(d) {
420-
return 0;
420+
return 0;
421421
};
422422

423423
labelFns.anchorFn = function(d) {
424-
return 'end';
424+
return 'end';
425425
};
426426

427427
labelFns.heightFn = function(d, a, h) {
428-
return 0;
428+
return 0;
429429
};
430430

431431
if(hasRoomForIt) {
@@ -445,14 +445,14 @@ proto.updateRadialAxis = function(fullLayout, polarLayout) {
445445
});
446446

447447
Axes.drawLabels(gd, ax, {
448-
vals: [0.2, 0.5, 1.0, 2.0, 5.0].map(function (d) {
449-
return {
450-
x: d,
451-
text: d,
452-
font: '"Open Sans", verdana, arial, sans-serif',
453-
fontColor: '#444',
454-
fontSize: 12,
455-
};
448+
vals: [0.2, 0.5, 1.0, 2.0, 5.0].map(function(d) {
449+
return {
450+
x: d,
451+
text: d,
452+
font: '"Open Sans", verdana, arial, sans-serif',
453+
fontColor: '#444',
454+
fontSize: 12,
455+
};
456456
}),
457457
layer: layers['radial-axis'],
458458
transFn: transFn2,
@@ -494,7 +494,7 @@ proto.updateRadialAxis = function(fullLayout, polarLayout) {
494494
)
495495
.attr('stroke-width', radialLayout.linewidth)
496496
.call(Color.stroke, radialLayout.linecolor);
497-
}
497+
};
498498

499499
proto.updateRadialAxisTitle = function(fullLayout, polarLayout, _angle) {
500500
var _this = this;
@@ -653,10 +653,10 @@ proto.updateAngularAxis = function(fullLayout, polarLayout) {
653653

654654
Axes.drawGrid(gd, ax, {
655655
// vals: vals,
656-
vals: [-5.0, -2.0, -1.0, -0.5, -0.2, 0.2, 0.5, 1.0, 2.0, 5.0].map(function (v) {
657-
return {
658-
x: v,
659-
};
656+
vals: [-5.0, -2.0, -1.0, -0.5, -0.2, 0.2, 0.5, 1.0, 2.0, 5.0].map(function(v) {
657+
return {
658+
x: v,
659+
};
660660
}),
661661
layer: layers['angular-grid'],
662662
path: gridPathFn,
@@ -665,17 +665,17 @@ proto.updateAngularAxis = function(fullLayout, polarLayout) {
665665
});
666666

667667
Axes.drawLabels(gd, ax, {
668-
vals: [-5.0, -2.0, -1.0, -0.5, -0.2, 0.0, 0.2, 0.5, 1.0, 2.0, 5.0, Infinity].map(function (v) {
669-
var radius = _this.radius / v;
670-
var theta = 2.0 * Math.atan2(radius, _this.radius);
671-
672-
return {
673-
x: theta * 360.0 / (2 * Math.PI),
674-
text: v === Infinity ? '∞' : ((v === 0.0 ? '0 + 0' : v) + 'j'),
675-
font: '"Open Sans", verdana, arial, sans-serif',
676-
fontColor: '#444',
677-
fontSize: v === Infinity ? 16 : 12,
678-
};
668+
vals: [-5.0, -2.0, -1.0, -0.5, -0.2, 0.0, 0.2, 0.5, 1.0, 2.0, 5.0, Infinity].map(function(v) {
669+
var radius = _this.radius / v;
670+
var theta = 2.0 * Math.atan2(radius, _this.radius);
671+
672+
return {
673+
x: theta * 360.0 / (2 * Math.PI),
674+
text: v === Infinity ? '∞' : ((v === 0.0 ? '0 + 0' : v) + 'j'),
675+
font: '"Open Sans", verdana, arial, sans-serif',
676+
fontColor: '#444',
677+
fontSize: v === Infinity ? 16 : 12,
678+
};
679679
}),
680680
layer: layers['angular-axis'],
681681
repositionOnUpdate: true,

src/traces/scattersmith/calc.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ var calcSelection = require('../scatter/calc_selection');
1111
var calcMarkerSize = require('../scatter/calc').calcMarkerSize;
1212

1313
function sq(x) {
14-
return x * x;
14+
return x * x;
1515
}
1616

1717
module.exports = function calc(gd, trace) {

src/traces/scattersmith/defaults.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,8 @@ function handleReImDefaults(traceIn, traceOut, layout, coerce) {
7171
var im = coerce('im');
7272
var len = 0;
7373

74-
if (re && im) {
75-
len = Math.min(re.length, im.length);
74+
if(re && im) {
75+
len = Math.min(re.length, im.length);
7676
}
7777

7878
traceOut._length = len;

src/traces/scattersmith/hover.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ function makeHoverPointText(cdi, trace, subplot, pointData) {
4545
}
4646

4747
if(!trace.hovertemplate) {
48-
pointData.extraText = cdi.re + ' + ' + cdi.im + 'j';
48+
pointData.extraText = cdi.re + ' + ' + cdi.im + 'j';
4949
}
5050
}
5151

src/traces/scattersmith/plot.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,19 @@ var scatterPlot = require('../scatter/plot');
44
var BADNUM = require('../../constants/numerical').BADNUM;
55

66
function sq(x) {
7-
return x * x;
7+
return x * x;
88
}
99

1010
function gammaTransformReal(re, im) {
11-
var denom = sq(re + 1.0) + sq(im);
12-
var result = (sq(re) + sq(im) - 1.0) / denom;
13-
return result;
11+
var denom = sq(re + 1.0) + sq(im);
12+
var result = (sq(re) + sq(im) - 1.0) / denom;
13+
return result;
1414
}
1515

1616
function gammaTransformImaginary(re, im) {
17-
var denom = sq(re + 1.0) + sq(im);
18-
var result = (2 * im) / denom;
19-
return result;
17+
var denom = sq(re + 1.0) + sq(im);
18+
var result = (2 * im) / denom;
19+
return result;
2020
}
2121

2222
module.exports = function plot(gd, subplot, moduleCalcData) {

0 commit comments

Comments
 (0)