@@ -95,8 +95,7 @@ module.exports = function draw(gd, id) {
9595
9696 if ( opts . fillgradient ) {
9797 filllevels = [ 0 ] ;
98- }
99- else if ( typeof opts . fillcolor === 'function' ) {
98+ } else if ( typeof opts . fillcolor === 'function' ) {
10099 if ( opts . filllevels ) {
101100 l0 = opts . filllevels . end + opts . filllevels . size / 100 ;
102101 ls = opts . filllevels . size ;
@@ -105,16 +104,14 @@ module.exports = function draw(gd, id) {
105104 if ( ls > 0 ? ( l >= l0 ) : ( l <= l0 ) ) break ;
106105 if ( l > zrange [ 0 ] && l < zrange [ 1 ] ) filllevels . push ( l ) ;
107106 }
108- }
109- else {
107+ } else {
110108 filllevels = linelevels . map ( function ( v ) {
111109 return v - opts . levels . size / 2 ;
112110 } ) ;
113111 filllevels . push ( filllevels [ filllevels . length - 1 ] +
114112 opts . levels . size ) ;
115113 }
116- }
117- else if ( opts . fillcolor && typeof opts . fillcolor === 'string' ) {
114+ } else if ( opts . fillcolor && typeof opts . fillcolor === 'string' ) {
118115 // doesn't matter what this value is, with a single value
119116 // we'll make a single fill rect covering the whole bar
120117 filllevels = [ 0 ] ;
@@ -292,8 +289,7 @@ module.exports = function draw(gd, id) {
292289 if ( opts . title . side === 'top' ) {
293290 y = ( 1 - ( yBottomFrac + lenFrac - ypadFrac ) ) * gs . h +
294291 gs . t + 3 + fontSize * 0.75 ;
295- }
296- else {
292+ } else {
297293 y = ( 1 - ( yBottomFrac + ypadFrac ) ) * gs . h +
298294 gs . t - 3 - fontSize * 0.25 ;
299295 }
@@ -323,8 +319,7 @@ module.exports = function draw(gd, id) {
323319 // vertical alignment, but this seems to work.
324320 titleTrans [ 1 ] -= ( titleHeight - lineSize ) / 2 ;
325321 }
326- }
327- else if ( titleText . node ( ) &&
322+ } else if ( titleText . node ( ) &&
328323 ! titleText . classed ( cn . jsPlaceholder ) ) {
329324 titleHeight = Drawing . bBox ( titleText . node ( ) ) . height ;
330325 }
@@ -336,8 +331,7 @@ module.exports = function draw(gd, id) {
336331 if ( opts . title . side === 'top' ) {
337332 cbAxisOut . domain [ 1 ] -= titleHeight / gs . h ;
338333 titleTrans [ 1 ] *= - 1 ;
339- }
340- else {
334+ } else {
341335 cbAxisOut . domain [ 0 ] += titleHeight / gs . h ;
342336 var nlines = svgTextUtils . lineCount ( titleText ) ;
343337 titleTrans [ 1 ] += ( 1 - nlines ) * lineSize ;
@@ -395,8 +389,7 @@ module.exports = function draw(gd, id) {
395389 if ( opts . fillgradient ) {
396390 Drawing . gradient ( fillEl , gd , id , 'vertical' ,
397391 opts . fillgradient , 'fill' ) ;
398- }
399- else {
392+ } else {
400393 // Tinycolor can't handle exponents and
401394 // at this scale, removing it makes no difference.
402395 var colorString = fillcolormap ( d ) . replace ( 'e-' , '' ) ;
@@ -514,8 +507,7 @@ module.exports = function draw(gd, id) {
514507 if ( mathJaxNode &&
515508 [ 'top' , 'bottom' ] . indexOf ( opts . title . side ) !== - 1 ) {
516509 titleWidth = Drawing . bBox ( mathJaxNode ) . width ;
517- }
518- else {
510+ } else {
519511 // note: the formula below works for all title sides,
520512 // (except for top/bottom mathjax, above)
521513 // but the weird gs.l is because the titleunshift
@@ -569,8 +561,7 @@ module.exports = function draw(gd, id) {
569561 marginOpts . y = opts . y ;
570562 marginOpts . t = outerheight * tFrac ;
571563 marginOpts . b = outerheight * bFrac ;
572- }
573- else {
564+ } else {
574565 marginOpts . t = marginOpts . b = 0 ;
575566 marginOpts . yt = opts . y + opts . len * tFrac ;
576567 marginOpts . yb = opts . y - opts . len * bFrac ;
@@ -582,8 +573,7 @@ module.exports = function draw(gd, id) {
582573 marginOpts . x = opts . x ;
583574 marginOpts . l = outerwidth * lFrac ;
584575 marginOpts . r = outerwidth * rFrac ;
585- }
586- else {
576+ } else {
587577 var extraThickness = outerwidth - thickPx ;
588578 marginOpts . l = extraThickness * lFrac ;
589579 marginOpts . r = extraThickness * rFrac ;
0 commit comments