Skip to content

Commit fd2351c

Browse files
lint
1 parent 197f7fa commit fd2351c

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

src/components/legend/draw.js

+16-16
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ module.exports = function draw(gd) {
5757

5858
var clipPath = fullLayout._topdefs.selectAll('#' + clipId)
5959
.data([0]);
60-
60+
6161
clipPath.enter().append('clipPath')
6262
.attr('id', clipId)
6363
.append('rect');
@@ -222,16 +222,16 @@ module.exports = function draw(gd) {
222222

223223
// If scrollbar should be shown.
224224
if(opts.height - scrollheight > 0 && !gd._context.staticPlot) {
225-
225+
226226
bg.attr({
227227
width: opts.width - 2 * opts.borderwidth + constants.scrollBarWidth
228228
});
229229

230230
clipPath.attr({
231231
width: opts.width + constants.scrollBarWidth
232232
});
233-
234-
if(gd.firstRender){
233+
234+
if(gd.firstRender) {
235235
// Move scrollbar to starting position
236236
scrollBar.call(
237237
Drawing.setRect,
@@ -240,31 +240,31 @@ module.exports = function draw(gd) {
240240
constants.scrollBarWidth,
241241
constants.scrollBarHeight
242242
);
243-
scrollBox.attr('data-scroll',0)
243+
scrollBox.attr('data-scroll',0);
244244
}
245-
245+
246246
scrollHandler(0,scrollheight);
247-
247+
248248
legend.on('wheel',null);
249249

250-
legend.on('wheel', function(){
250+
legend.on('wheel', function() {
251251
var e = d3.event;
252252
e.preventDefault();
253-
scrollHandler(e.deltaY / 20, scrollheight);
253+
scrollHandler(e.deltaY / 20, scrollheight);
254254
})
255255

256-
scrollBar.on(".drag",null);
257-
scrollBox.on(".drag",null);
256+
scrollBar.on('.drag',null);
257+
scrollBox.on('.drag',null);
258258
var drag = d3.behavior.drag()
259-
.on('drag', function(d){
260-
scrollHandler( d3.event.dy, scrollheight);
259+
.on('drag', function() {
260+
scrollHandler(d3.event.dy, scrollheight);
261261
});
262-
262+
263263
scrollBar.call(drag);
264264
scrollBox.call(drag);
265-
265+
266266
}
267-
267+
268268

269269
function scrollHandler(delta, scrollheight) {
270270

0 commit comments

Comments
 (0)