Skip to content

Commit a11e698

Browse files
committed
lint (mostly infix spacing)
1 parent dcea0dd commit a11e698

File tree

1 file changed

+16
-12
lines changed

1 file changed

+16
-12
lines changed

src/components/legend/style.js

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -28,25 +28,25 @@ module.exports = function style(s) {
2828
.selectAll('g.legendfill')
2929
.data([d]);
3030
fill.enter().append('g')
31-
.classed('legendfill',true);
31+
.classed('legendfill', true);
3232

3333
var line = traceGroup
3434
.selectAll('g.legendlines')
3535
.data([d]);
3636
line.enter().append('g')
37-
.classed('legendlines',true);
37+
.classed('legendlines', true);
3838

3939
var symbol = traceGroup
4040
.selectAll('g.legendsymbols')
4141
.data([d]);
4242
symbol.enter().append('g')
43-
.classed('legendsymbols',true);
43+
.classed('legendsymbols', true);
4444
symbol.style('opacity', d[0].trace.opacity);
4545

4646
symbol.selectAll('g.legendpoints')
4747
.data([d])
4848
.enter().append('g')
49-
.classed('legendpoints',true);
49+
.classed('legendpoints', true);
5050
})
5151
.each(styleBars)
5252
.each(styleBoxes)
@@ -62,14 +62,14 @@ function styleLines(d) {
6262

6363
var fill = d3.select(this).select('.legendfill').selectAll('path')
6464
.data(showFill ? [d] : []);
65-
fill.enter().append('path').classed('js-fill',true);
65+
fill.enter().append('path').classed('js-fill', true);
6666
fill.exit().remove();
6767
fill.attr('d', 'M5,0h30v6h-30z')
6868
.call(Drawing.fillGroupStyle);
6969

7070
var line = d3.select(this).select('.legendlines').selectAll('path')
7171
.data(showLine ? [d] : []);
72-
line.enter().append('path').classed('js-line',true)
72+
line.enter().append('path').classed('js-line', true)
7373
.attr('d', 'M5,0h30');
7474
line.exit().remove();
7575
line.call(Drawing.lineGroupStyle);
@@ -161,20 +161,22 @@ function stylePoints(d) {
161161

162162
function styleBars(d) {
163163
var trace = d[0].trace,
164-
marker = trace.marker||{},
165-
markerLine = marker.line||{},
164+
marker = trace.marker || {},
165+
markerLine = marker.line || {},
166166
barpath = d3.select(this).select('g.legendpoints')
167167
.selectAll('path.legendbar')
168168
.data(Plots.traceIs(trace, 'bar') ? [d] : []);
169-
barpath.enter().append('path').classed('legendbar',true)
169+
barpath.enter().append('path').classed('legendbar', true)
170170
.attr('d','M6,6H-6V-6H6Z')
171-
.attr('transform','translate(20,0)');
171+
.attr('transform', 'translate(20,0)');
172172
barpath.exit().remove();
173173
barpath.each(function(d) {
174-
var w = (d.mlw+1 || markerLine.width+1) - 1,
174+
var w = (d.mlw + 1 || markerLine.width + 1) - 1,
175175
p = d3.select(this);
176+
176177
p.style('stroke-width',w+'px')
177178
.call(Color.fill, d.mc || marker.color);
179+
178180
if(w) {
179181
p.call(Color.stroke, d.mlc || markerLine.color);
180182
}
@@ -192,10 +194,12 @@ function styleBoxes(d) {
192194
.attr('transform', 'translate(20,0)');
193195
pts.exit().remove();
194196
pts.each(function(d) {
195-
var w = (d.lw+1 || trace.line.width+1) - 1,
197+
var w = (d.lw + 1 || trace.line.width + 1) - 1,
196198
p = d3.select(this);
199+
197200
p.style('stroke-width', w+'px')
198201
.call(Color.fill, d.fc || trace.fillcolor);
202+
199203
if(w) {
200204
p.call(Color.stroke, d.lc || trace.line.color);
201205
}

0 commit comments

Comments
 (0)