@@ -196,7 +196,7 @@ module.exports = function draw(gd) {
196
196
197
197
// Set size and position of all the elements that make up a legend:
198
198
// legend, background and border, scroll box and scroll bar
199
- Lib . setTranslate ( legend , lx , ly ) ;
199
+ Drawing . setTranslate ( legend , lx , ly ) ;
200
200
201
201
var scrollBarYMax = legendHeight -
202
202
constants . scrollBarHeight -
@@ -214,7 +214,7 @@ module.exports = function draw(gd) {
214
214
y : opts . borderwidth / 2
215
215
} ) ;
216
216
217
- Lib . setTranslate ( scrollBox , 0 , 0 ) ;
217
+ Drawing . setTranslate ( scrollBox , 0 , 0 ) ;
218
218
219
219
clipPath . select ( 'rect' ) . attr ( {
220
220
width : legendWidth - 2 * opts . borderwidth ,
@@ -289,7 +289,7 @@ module.exports = function draw(gd) {
289
289
function scrollHandler ( scrollBarY , scrollBoxY ) {
290
290
scrollBox
291
291
. attr ( 'data-scroll' , scrollBoxY )
292
- . call ( Lib . setTranslate , 0 , scrollBoxY ) ;
292
+ . call ( Drawing . setTranslate , 0 , scrollBoxY ) ;
293
293
294
294
scrollBar . call (
295
295
Drawing . setRect ,
@@ -311,7 +311,7 @@ module.exports = function draw(gd) {
311
311
dragElement . init ( {
312
312
element : legend . node ( ) ,
313
313
prepFn : function ( ) {
314
- var transform = Lib . getTranslate ( legend ) ;
314
+ var transform = Drawing . getTranslate ( legend ) ;
315
315
316
316
x0 = transform . x ;
317
317
y0 = transform . y ;
@@ -320,7 +320,7 @@ module.exports = function draw(gd) {
320
320
var newX = x0 + dx ,
321
321
newY = y0 + dy ;
322
322
323
- Lib . setTranslate ( legend , newX , newY ) ;
323
+ Drawing . setTranslate ( legend , newX , newY ) ;
324
324
325
325
xf = dragElement . align ( newX , 0 , gs . l , gs . l + gs . w , opts . xanchor ) ;
326
326
yf = dragElement . align ( newY , 0 , gs . t + gs . h , gs . t , opts . yanchor ) ;
@@ -384,7 +384,7 @@ function drawTexts(g, gd) {
384
384
var transforms = legendItem . trace . transforms ,
385
385
direction = transforms [ transforms . length - 1 ] . direction ;
386
386
387
- astr = direction + '.legenditem. name' ;
387
+ astr = direction + '.name' ;
388
388
}
389
389
else astr = 'name' ;
390
390
@@ -464,7 +464,7 @@ function computeTextDimensions(g, gd) {
464
464
height = mathjaxBB . height ;
465
465
width = mathjaxBB . width ;
466
466
467
- Lib . setTranslate ( mathjaxGroup , 0 , ( height / 4 ) ) ;
467
+ Drawing . setTranslate ( mathjaxGroup , 0 , ( height / 4 ) ) ;
468
468
}
469
469
else {
470
470
var text = g . selectAll ( '.legendtext' ) ,
@@ -496,7 +496,7 @@ function computeLegendDimensions(gd, groups, traces) {
496
496
if ( helpers . isVertical ( opts ) ) {
497
497
if ( isGrouped ) {
498
498
groups . each ( function ( d , i ) {
499
- Lib . setTranslate ( this , 0 , i * opts . tracegroupgap ) ;
499
+ Drawing . setTranslate ( this , 0 , i * opts . tracegroupgap ) ;
500
500
} ) ;
501
501
}
502
502
@@ -508,7 +508,7 @@ function computeLegendDimensions(gd, groups, traces) {
508
508
textHeight = legendItem . height ,
509
509
textWidth = legendItem . width ;
510
510
511
- Lib . setTranslate ( this ,
511
+ Drawing . setTranslate ( this ,
512
512
borderwidth ,
513
513
( 5 + borderwidth + opts . height + textHeight / 2 ) ) ;
514
514
@@ -559,7 +559,7 @@ function computeLegendDimensions(gd, groups, traces) {
559
559
}
560
560
561
561
groups . each ( function ( d , i ) {
562
- Lib . setTranslate ( this , groupXOffsets [ i ] , 0 ) ;
562
+ Drawing . setTranslate ( this , groupXOffsets [ i ] , 0 ) ;
563
563
} ) ;
564
564
565
565
groups . each ( function ( ) {
@@ -571,7 +571,7 @@ function computeLegendDimensions(gd, groups, traces) {
571
571
var legendItem = d [ 0 ] ,
572
572
textHeight = legendItem . height ;
573
573
574
- Lib . setTranslate ( this ,
574
+ Drawing . setTranslate ( this ,
575
575
0 ,
576
576
( 5 + borderwidth + groupHeight + textHeight / 2 ) ) ;
577
577
@@ -626,7 +626,7 @@ function computeLegendDimensions(gd, groups, traces) {
626
626
maxTraceHeight = 0 ;
627
627
}
628
628
629
- Lib . setTranslate ( this ,
629
+ Drawing . setTranslate ( this ,
630
630
( borderwidth + offsetX ) ,
631
631
( 5 + borderwidth + legendItem . height / 2 ) + rowHeight ) ;
632
632
0 commit comments