Skip to content

Commit c821377

Browse files
committed
Fix non-automatic lint errors
1 parent 17e60c0 commit c821377

File tree

4 files changed

+4
-40
lines changed

4 files changed

+4
-40
lines changed

src/plots/smith/smith.js

+4-27
Original file line numberDiff line numberDiff line change
@@ -230,8 +230,6 @@ proto.updateLayout = function(fullLayout, polarLayout) {
230230
var yOffset2 = _this.yOffset2 = gs.t + gs.h * (1 - yDomain2[1]);
231231
// circle radius in px
232232
var radius = _this.radius = xLength2 / dxSectorBBox;
233-
// 'inner' radius in px (when polar.hole is set)
234-
var innerRadius = _this.innerRadius = polarLayout.hole * radius;
235233
// circle center position in px
236234
var cx = _this.cx = xOffset2 - radius * sectorBBox[0];
237235
var cy = _this.cy = yOffset2 + radius * sectorBBox[3];
@@ -363,7 +361,6 @@ proto.updateRadialAxis = function(fullLayout, polarLayout) {
363361
var gd = _this.gd;
364362
var layers = _this.layers;
365363
var radius = _this.radius;
366-
var innerRadius = _this.innerRadius;
367364
var cx = _this.cx;
368365
var cy = _this.cy;
369366
var radialLayout = polarLayout.radialaxis;
@@ -384,11 +381,6 @@ proto.updateRadialAxis = function(fullLayout, polarLayout) {
384381
ax.tickangle = 180;
385382
}
386383

387-
// easier to set rotate angle with custom translate function
388-
var transFn = function(d) {
389-
return strTranslate(ax.l2p(d.x) + innerRadius, 0);
390-
};
391-
392384
var transFn2 = function(d) {
393385
return strTranslate(ax.c2p(d.x), -2);
394386
};
@@ -408,33 +400,27 @@ proto.updateRadialAxis = function(fullLayout, polarLayout) {
408400
_this.radialTickLayout = newTickLayout;
409401
}
410402

411-
var out = Axes.makeLabelFns(ax, 0);
412-
var labelStandoff = out.labelStandoff;
413403
var labelFns = {};
414404

415-
labelFns.xFn = function(d) {
405+
labelFns.xFn = function() {
416406
return 0;
417407
};
418408

419-
labelFns.yFn = function(d) {
409+
labelFns.yFn = function() {
420410
return 0;
421411
};
422412

423-
labelFns.anchorFn = function(d) {
413+
labelFns.anchorFn = function() {
424414
return 'end';
425415
};
426416

427-
labelFns.heightFn = function(d, a, h) {
417+
labelFns.heightFn = function() {
428418
return 0;
429419
};
430420

431421
if(hasRoomForIt) {
432422
ax.setScale();
433423

434-
var vals = Axes.calcTicks(ax);
435-
// var valsClipped = Axes.clipEnds(ax, vals);
436-
var tickSign = Axes.getTickSigns(ax)[2];
437-
438424
// circular grid lines
439425
Axes.drawGrid(gd, ax, {
440426
vals: [{x: 0.2 }, {x: 0.5 }, {x: 1.0 }, {x: 2.0 }, {x: 5.0 } ],
@@ -541,7 +527,6 @@ proto.updateAngularAxis = function(fullLayout, polarLayout) {
541527
var gd = _this.gd;
542528
var layers = _this.layers;
543529
var radius = _this.radius;
544-
var innerRadius = _this.innerRadius;
545530
var cx = _this.cx;
546531
var cy = _this.cy;
547532
var angularLayout = polarLayout.angularaxis;
@@ -569,11 +554,6 @@ proto.updateAngularAxis = function(fullLayout, polarLayout) {
569554
return _transFn(t2g(d));
570555
};
571556

572-
var transFn2 = function(d) {
573-
var rad = t2g(d);
574-
return _transFn(rad) + strRotate(-rad2deg(rad));
575-
};
576-
577557
var gridPathFn = function(d) {
578558
var value = d.x;
579559
var radius = _this.radius / d.x;
@@ -648,9 +628,6 @@ proto.updateAngularAxis = function(fullLayout, polarLayout) {
648628
}
649629

650630
if(ax.visible) {
651-
var tickSign = ax.ticks === 'inside' ? -1 : 1;
652-
var pad = (ax.linewidth || 1) / 2;
653-
654631
Axes.drawGrid(gd, ax, {
655632
// vals: vals,
656633
vals: [-5.0, -2.0, -1.0, -0.5, -0.2, 0.2, 0.5, 1.0, 2.0, 5.0].map(function(v) {

src/traces/scattersmith/calc.js

-4
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,6 @@ var arraysToCalcdata = require('../scatter/arrays_to_calcdata');
1010
var calcSelection = require('../scatter/calc_selection');
1111
var calcMarkerSize = require('../scatter/calc').calcMarkerSize;
1212

13-
function sq(x) {
14-
return x * x;
15-
}
16-
1713
module.exports = function calc(gd, trace) {
1814
var fullLayout = gd._fullLayout;
1915
var subplotId = trace.subplot;

src/traces/scattersmith/hover.js

-6
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,6 @@ function makeHoverPointText(cdi, trace, subplot, pointData) {
3838
pointData.rLabel = labels.rLabel;
3939
pointData.thetaLabel = labels.thetaLabel;
4040

41-
var hoverinfo = cdi.hi || trace.hoverinfo;
42-
var text = [];
43-
function textPart(ax, val) {
44-
text.push(ax._hovertitle + ': ' + val);
45-
}
46-
4741
if(!trace.hovertemplate) {
4842
pointData.extraText = cdi.re + ' + ' + cdi.im + 'j';
4943
}

src/traces/scattersmith/plot.js

-3
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,6 @@ module.exports = function plot(gd, subplot, moduleCalcData) {
2929
layerClipId: subplot._hasClipOnAxisFalse ? subplot.clipIds.forTraces : null
3030
};
3131

32-
var radialAxis = subplot.radialAxis;
33-
var angularAxis = subplot.angularAxis;
34-
3532
// convert:
3633
// 'c' (r,theta) -> 'geometric' (r,theta) -> (x,y)
3734
for(var i = 0; i < moduleCalcData.length; i++) {

0 commit comments

Comments
 (0)