@@ -78,9 +78,9 @@ module.exports = function draw(gd) {
78
78
'shape-rendering' : 'crispEdges'
79
79
} ) ;
80
80
81
- bg . call ( Color . stroke , opts . bordercolor ) ;
82
- bg . call ( Color . fill , opts . bgcolor ) ;
83
- bg . style ( 'stroke-width' , opts . borderwidth + 'px' ) ;
81
+ bg . call ( Color . stroke , opts . bordercolor )
82
+ . call ( Color . fill , opts . bgcolor )
83
+ . style ( 'stroke-width' , opts . borderwidth + 'px' ) ;
84
84
85
85
var scrollBox = legend . selectAll ( 'g.scrollbox' )
86
86
. data ( [ 0 ] ) ;
@@ -229,7 +229,7 @@ module.exports = function draw(gd) {
229
229
y : opts . borderwidth
230
230
} ) ;
231
231
232
- scrollBox . call ( Drawing . setClipUrl , clipId ) ;
232
+ Drawing . setClipUrl ( scrollBox , clipId ) ;
233
233
234
234
Drawing . setRect ( scrollBar , 0 , 0 , 0 , 0 ) ;
235
235
delete opts . _scrollY ;
@@ -268,7 +268,7 @@ module.exports = function draw(gd) {
268
268
y : opts . borderwidth - scrollBoxY
269
269
} ) ;
270
270
271
- scrollBox . call ( Drawing . setClipUrl , clipId ) ;
271
+ Drawing . setClipUrl ( scrollBox , clipId ) ;
272
272
273
273
scrollHandler ( scrollBoxY , scrollBarHeight , scrollRatio ) ;
274
274
@@ -306,11 +306,10 @@ module.exports = function draw(gd) {
306
306
307
307
function scrollHandler ( scrollBoxY , scrollBarHeight , scrollRatio ) {
308
308
opts . _scrollY = gd . _fullLayout . legend . _scrollY = scrollBoxY ;
309
- scrollBox
310
- . call ( Drawing . setTranslate , 0 , scrollBoxY ) ;
309
+ Drawing . setTranslate ( scrollBox , 0 , scrollBoxY ) ;
311
310
312
- scrollBar . call (
313
- Drawing . setRect ,
311
+ Drawing . setRect (
312
+ scrollBar ,
314
313
legendWidth ,
315
314
constants . scrollBarMargin - scrollBoxY * scrollRatio ,
316
315
constants . scrollBarWidth ,
@@ -441,7 +440,7 @@ function drawTexts(g, gd) {
441
440
return Plotly . restyle ( gd , update , traceIndex ) ;
442
441
} ) ;
443
442
} else {
444
- text . call ( textLayout ) ;
443
+ textLayout ( text ) ;
445
444
}
446
445
}
447
446
@@ -671,7 +670,7 @@ function computeLegendDimensions(gd, groups, traces) {
671
670
var legendItem = d [ 0 ] ,
672
671
bg = d3 . select ( this ) . select ( '.legendtoggle' ) ;
673
672
674
- bg . call ( Drawing . setRect ,
673
+ Drawing . setRect ( bg ,
675
674
0 ,
676
675
- legendItem . height / 2 ,
677
676
( gd . _context . edits . legendText ? 0 : opts . _width ) + extraWidth ,
0 commit comments