Skip to content

Commit 51358f2

Browse files
committed
misc linting
1 parent 0782274 commit 51358f2

File tree

3 files changed

+8
-15
lines changed

3 files changed

+8
-15
lines changed

src/components/drawing/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ drawing.crispRound = function(gd, lineWidth, dflt) {
136136
drawing.singleLineStyle = function(d, s, lw, lc, ld) {
137137
s.style('fill', 'none');
138138
var line = (((d || [])[0] || {}).trace || {}).line || {};
139-
var lw1 = lw || line.width||0;
139+
var lw1 = lw || line.width || 0;
140140
var dash = ld || line.dash || '';
141141

142142
Color.stroke(s, lc || line.color);
@@ -147,7 +147,7 @@ drawing.lineGroupStyle = function(s, lw, lc, ld) {
147147
s.style('fill', 'none')
148148
.each(function(d) {
149149
var line = (((d || [])[0] || {}).trace || {}).line || {};
150-
var lw1 = lw || line.width||0;
150+
var lw1 = lw || line.width || 0;
151151
var dash = ld || line.dash || '';
152152

153153
d3.select(this)

src/components/legend/style.js

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -83,16 +83,13 @@ module.exports = function style(s, gd) {
8383

8484
if(coloring === 'lines') {
8585
showGradientLine = true;
86-
}
87-
else {
88-
showLine = coloring === 'none' || coloring === 'heatmap' ||
89-
contours.showlines;
86+
} else {
87+
showLine = coloring === 'none' || coloring === 'heatmap' || contours.showlines;
9088
}
9189

9290
if(contours.type === 'constraint') {
9391
showFill = contours._operation !== '=';
94-
}
95-
else if(coloring === 'fill' || coloring === 'heatmap') {
92+
} else if(coloring === 'fill' || coloring === 'heatmap') {
9693
showGradientFill = true;
9794
}
9895
}
@@ -294,9 +291,7 @@ module.exports = function style(s, gd) {
294291
p.style('stroke-width', w + 'px')
295292
.call(Color.fill, d0.mc || marker.color);
296293

297-
if(w) {
298-
p.call(Color.stroke, d0.mlc || markerLine.color);
299-
}
294+
if(w) Color.stroke(p, d0.mlc || markerLine.color);
300295
});
301296
}
302297

@@ -319,9 +314,7 @@ module.exports = function style(s, gd) {
319314
p.style('stroke-width', w + 'px')
320315
.call(Color.fill, trace.fillcolor);
321316

322-
if(w) {
323-
Color.stroke(p, trace.line.color);
324-
}
317+
if(w) Color.stroke(p, trace.line.color);
325318
});
326319
}
327320

src/traces/pie/style_one.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ module.exports = function styleOne(s, pt, trace) {
1616
var lineColor = castOption(line.color, pt.pts) || Color.defaultLine;
1717
var lineWidth = castOption(line.width, pt.pts) || 0;
1818

19-
s.style({'stroke-width': lineWidth})
19+
s.style('stroke-width', lineWidth)
2020
.call(Color.fill, pt.color)
2121
.call(Color.stroke, lineColor);
2222
};

0 commit comments

Comments
 (0)