@@ -57,7 +57,7 @@ module.exports = function draw(gd) {
57
57
58
58
var clipPath = fullLayout . _topdefs . selectAll ( '#' + clipId )
59
59
. data ( [ 0 ] ) ;
60
-
60
+
61
61
clipPath . enter ( ) . append ( 'clipPath' )
62
62
. attr ( 'id' , clipId )
63
63
. append ( 'rect' ) ;
@@ -222,16 +222,16 @@ module.exports = function draw(gd) {
222
222
223
223
// If scrollbar should be shown.
224
224
if ( opts . height - scrollheight > 0 && ! gd . _context . staticPlot ) {
225
-
225
+
226
226
bg . attr ( {
227
227
width : opts . width - 2 * opts . borderwidth + constants . scrollBarWidth
228
228
} ) ;
229
229
230
230
clipPath . attr ( {
231
231
width : opts . width + constants . scrollBarWidth
232
232
} ) ;
233
-
234
- if ( gd . firstRender ) {
233
+
234
+ if ( gd . firstRender ) {
235
235
// Move scrollbar to starting position
236
236
scrollBar . call (
237
237
Drawing . setRect ,
@@ -240,31 +240,31 @@ module.exports = function draw(gd) {
240
240
constants . scrollBarWidth ,
241
241
constants . scrollBarHeight
242
242
) ;
243
- scrollBox . attr ( 'data-scroll' , 0 )
243
+ scrollBox . attr ( 'data-scroll' , 0 ) ;
244
244
}
245
-
245
+
246
246
scrollHandler ( 0 , scrollheight ) ;
247
-
247
+
248
248
legend . on ( 'wheel' , null ) ;
249
249
250
- legend . on ( 'wheel' , function ( ) {
250
+ legend . on ( 'wheel' , function ( ) {
251
251
var e = d3 . event ;
252
252
e . preventDefault ( ) ;
253
- scrollHandler ( e . deltaY / 20 , scrollheight ) ;
253
+ scrollHandler ( e . deltaY / 20 , scrollheight ) ;
254
254
} )
255
255
256
- scrollBar . on ( " .drag" , null ) ;
257
- scrollBox . on ( " .drag" , null ) ;
256
+ scrollBar . on ( ' .drag' , null ) ;
257
+ scrollBox . on ( ' .drag' , null ) ;
258
258
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 ) ;
261
261
} ) ;
262
-
262
+
263
263
scrollBar . call ( drag ) ;
264
264
scrollBox . call ( drag ) ;
265
-
265
+
266
266
}
267
-
267
+
268
268
269
269
function scrollHandler ( delta , scrollheight ) {
270
270
0 commit comments