Skip to content

Commit

Permalink
Fix non-automatic lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
waxlamp committed Jun 22, 2021
1 parent 41a5c28 commit 38dcaca
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 40 deletions.
31 changes: 4 additions & 27 deletions src/plots/smith/smith.js
Original file line number Diff line number Diff line change
Expand Up @@ -230,8 +230,6 @@ proto.updateLayout = function(fullLayout, polarLayout) {
var yOffset2 = _this.yOffset2 = gs.t + gs.h * (1 - yDomain2[1]);
// circle radius in px
var radius = _this.radius = xLength2 / dxSectorBBox;
// 'inner' radius in px (when polar.hole is set)
var innerRadius = _this.innerRadius = polarLayout.hole * radius;
// circle center position in px
var cx = _this.cx = xOffset2 - radius * sectorBBox[0];
var cy = _this.cy = yOffset2 + radius * sectorBBox[3];
Expand Down Expand Up @@ -363,7 +361,6 @@ proto.updateRadialAxis = function(fullLayout, polarLayout) {
var gd = _this.gd;
var layers = _this.layers;
var radius = _this.radius;
var innerRadius = _this.innerRadius;
var cx = _this.cx;
var cy = _this.cy;
var radialLayout = polarLayout.radialaxis;
Expand All @@ -384,11 +381,6 @@ proto.updateRadialAxis = function(fullLayout, polarLayout) {
ax.tickangle = 180;
}

// easier to set rotate angle with custom translate function
var transFn = function(d) {
return strTranslate(ax.l2p(d.x) + innerRadius, 0);
};

var transFn2 = function(d) {
return strTranslate(ax.c2p(d.x), -2);
};
Expand All @@ -408,33 +400,27 @@ proto.updateRadialAxis = function(fullLayout, polarLayout) {
_this.radialTickLayout = newTickLayout;
}

var out = Axes.makeLabelFns(ax, 0);
var labelStandoff = out.labelStandoff;
var labelFns = {};

labelFns.xFn = function(d) {
labelFns.xFn = function() {
return 0;
};

labelFns.yFn = function(d) {
labelFns.yFn = function() {
return 0;
};

labelFns.anchorFn = function(d) {
labelFns.anchorFn = function() {
return 'end';
};

labelFns.heightFn = function(d, a, h) {
labelFns.heightFn = function() {
return 0;
};

if(hasRoomForIt) {
ax.setScale();

var vals = Axes.calcTicks(ax);
// var valsClipped = Axes.clipEnds(ax, vals);
var tickSign = Axes.getTickSigns(ax)[2];

// circular grid lines
Axes.drawGrid(gd, ax, {
vals: [{x: 0.2 }, {x: 0.5 }, {x: 1.0 }, {x: 2.0 }, {x: 5.0 } ],
Expand Down Expand Up @@ -541,7 +527,6 @@ proto.updateAngularAxis = function(fullLayout, polarLayout) {
var gd = _this.gd;
var layers = _this.layers;
var radius = _this.radius;
var innerRadius = _this.innerRadius;
var cx = _this.cx;
var cy = _this.cy;
var angularLayout = polarLayout.angularaxis;
Expand Down Expand Up @@ -569,11 +554,6 @@ proto.updateAngularAxis = function(fullLayout, polarLayout) {
return _transFn(t2g(d));
};

var transFn2 = function(d) {
var rad = t2g(d);
return _transFn(rad) + strRotate(-rad2deg(rad));
};

var gridPathFn = function(d) {
var value = d.x;
var radius = _this.radius / d.x;
Expand Down Expand Up @@ -648,9 +628,6 @@ proto.updateAngularAxis = function(fullLayout, polarLayout) {
}

if(ax.visible) {
var tickSign = ax.ticks === 'inside' ? -1 : 1;
var pad = (ax.linewidth || 1) / 2;

Axes.drawGrid(gd, ax, {
// vals: vals,
vals: [-5.0, -2.0, -1.0, -0.5, -0.2, 0.2, 0.5, 1.0, 2.0, 5.0].map(function(v) {
Expand Down
4 changes: 0 additions & 4 deletions src/traces/scattersmith/calc.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@ var arraysToCalcdata = require('../scatter/arrays_to_calcdata');
var calcSelection = require('../scatter/calc_selection');
var calcMarkerSize = require('../scatter/calc').calcMarkerSize;

function sq(x) {
return x * x;
}

module.exports = function calc(gd, trace) {
var fullLayout = gd._fullLayout;
var subplotId = trace.subplot;
Expand Down
6 changes: 0 additions & 6 deletions src/traces/scattersmith/hover.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,6 @@ function makeHoverPointText(cdi, trace, subplot, pointData) {
pointData.rLabel = labels.rLabel;
pointData.thetaLabel = labels.thetaLabel;

var hoverinfo = cdi.hi || trace.hoverinfo;
var text = [];
function textPart(ax, val) {
text.push(ax._hovertitle + ': ' + val);
}

if(!trace.hovertemplate) {
pointData.extraText = cdi.re + ' + ' + cdi.im + 'j';
}
Expand Down
3 changes: 0 additions & 3 deletions src/traces/scattersmith/plot.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,6 @@ module.exports = function plot(gd, subplot, moduleCalcData) {
layerClipId: subplot._hasClipOnAxisFalse ? subplot.clipIds.forTraces : null
};

var radialAxis = subplot.radialAxis;
var angularAxis = subplot.angularAxis;

// convert:
// 'c' (r,theta) -> 'geometric' (r,theta) -> (x,y)
for(var i = 0; i < moduleCalcData.length; i++) {
Expand Down

0 comments on commit 38dcaca

Please sign in to comment.