@@ -196,7 +196,7 @@ module.exports = function draw(gd) {
196196
197197 // Set size and position of all the elements that make up a legend:
198198 // legend, background and border, scroll box and scroll bar
199- Lib . setTranslate ( legend , lx , ly ) ;
199+ Drawing . setTranslate ( legend , lx , ly ) ;
200200
201201 var scrollBarYMax = legendHeight -
202202 constants . scrollBarHeight -
@@ -214,7 +214,7 @@ module.exports = function draw(gd) {
214214 y : opts . borderwidth / 2
215215 } ) ;
216216
217- Lib . setTranslate ( scrollBox , 0 , 0 ) ;
217+ Drawing . setTranslate ( scrollBox , 0 , 0 ) ;
218218
219219 clipPath . select ( 'rect' ) . attr ( {
220220 width : legendWidth - 2 * opts . borderwidth ,
@@ -289,7 +289,7 @@ module.exports = function draw(gd) {
289289 function scrollHandler ( scrollBarY , scrollBoxY ) {
290290 scrollBox
291291 . attr ( 'data-scroll' , scrollBoxY )
292- . call ( Lib . setTranslate , 0 , scrollBoxY ) ;
292+ . call ( Drawing . setTranslate , 0 , scrollBoxY ) ;
293293
294294 scrollBar . call (
295295 Drawing . setRect ,
@@ -311,7 +311,7 @@ module.exports = function draw(gd) {
311311 dragElement . init ( {
312312 element : legend . node ( ) ,
313313 prepFn : function ( ) {
314- var transform = Lib . getTranslate ( legend ) ;
314+ var transform = Drawing . getTranslate ( legend ) ;
315315
316316 x0 = transform . x ;
317317 y0 = transform . y ;
@@ -320,7 +320,7 @@ module.exports = function draw(gd) {
320320 var newX = x0 + dx ,
321321 newY = y0 + dy ;
322322
323- Lib . setTranslate ( legend , newX , newY ) ;
323+ Drawing . setTranslate ( legend , newX , newY ) ;
324324
325325 xf = dragElement . align ( newX , 0 , gs . l , gs . l + gs . w , opts . xanchor ) ;
326326 yf = dragElement . align ( newY , 0 , gs . t + gs . h , gs . t , opts . yanchor ) ;
@@ -384,7 +384,7 @@ function drawTexts(g, gd) {
384384 var transforms = legendItem . trace . transforms ,
385385 direction = transforms [ transforms . length - 1 ] . direction ;
386386
387- astr = direction + '.legenditem. name' ;
387+ astr = direction + '.name' ;
388388 }
389389 else astr = 'name' ;
390390
@@ -464,7 +464,7 @@ function computeTextDimensions(g, gd) {
464464 height = mathjaxBB . height ;
465465 width = mathjaxBB . width ;
466466
467- Lib . setTranslate ( mathjaxGroup , 0 , ( height / 4 ) ) ;
467+ Drawing . setTranslate ( mathjaxGroup , 0 , ( height / 4 ) ) ;
468468 }
469469 else {
470470 var text = g . selectAll ( '.legendtext' ) ,
@@ -496,7 +496,7 @@ function computeLegendDimensions(gd, groups, traces) {
496496 if ( helpers . isVertical ( opts ) ) {
497497 if ( isGrouped ) {
498498 groups . each ( function ( d , i ) {
499- Lib . setTranslate ( this , 0 , i * opts . tracegroupgap ) ;
499+ Drawing . setTranslate ( this , 0 , i * opts . tracegroupgap ) ;
500500 } ) ;
501501 }
502502
@@ -508,7 +508,7 @@ function computeLegendDimensions(gd, groups, traces) {
508508 textHeight = legendItem . height ,
509509 textWidth = legendItem . width ;
510510
511- Lib . setTranslate ( this ,
511+ Drawing . setTranslate ( this ,
512512 borderwidth ,
513513 ( 5 + borderwidth + opts . height + textHeight / 2 ) ) ;
514514
@@ -559,7 +559,7 @@ function computeLegendDimensions(gd, groups, traces) {
559559 }
560560
561561 groups . each ( function ( d , i ) {
562- Lib . setTranslate ( this , groupXOffsets [ i ] , 0 ) ;
562+ Drawing . setTranslate ( this , groupXOffsets [ i ] , 0 ) ;
563563 } ) ;
564564
565565 groups . each ( function ( ) {
@@ -571,7 +571,7 @@ function computeLegendDimensions(gd, groups, traces) {
571571 var legendItem = d [ 0 ] ,
572572 textHeight = legendItem . height ;
573573
574- Lib . setTranslate ( this ,
574+ Drawing . setTranslate ( this ,
575575 0 ,
576576 ( 5 + borderwidth + groupHeight + textHeight / 2 ) ) ;
577577
@@ -626,7 +626,7 @@ function computeLegendDimensions(gd, groups, traces) {
626626 maxTraceHeight = 0 ;
627627 }
628628
629- Lib . setTranslate ( this ,
629+ Drawing . setTranslate ( this ,
630630 ( borderwidth + offsetX ) ,
631631 ( 5 + borderwidth + legendItem . height / 2 ) + rowHeight ) ;
632632
0 commit comments