@@ -95,8 +95,7 @@ module.exports = function draw(gd, id) {
95
95
96
96
if ( opts . fillgradient ) {
97
97
filllevels = [ 0 ] ;
98
- }
99
- else if ( typeof opts . fillcolor === 'function' ) {
98
+ } else if ( typeof opts . fillcolor === 'function' ) {
100
99
if ( opts . filllevels ) {
101
100
l0 = opts . filllevels . end + opts . filllevels . size / 100 ;
102
101
ls = opts . filllevels . size ;
@@ -105,16 +104,14 @@ module.exports = function draw(gd, id) {
105
104
if ( ls > 0 ? ( l >= l0 ) : ( l <= l0 ) ) break ;
106
105
if ( l > zrange [ 0 ] && l < zrange [ 1 ] ) filllevels . push ( l ) ;
107
106
}
108
- }
109
- else {
107
+ } else {
110
108
filllevels = linelevels . map ( function ( v ) {
111
109
return v - opts . levels . size / 2 ;
112
110
} ) ;
113
111
filllevels . push ( filllevels [ filllevels . length - 1 ] +
114
112
opts . levels . size ) ;
115
113
}
116
- }
117
- else if ( opts . fillcolor && typeof opts . fillcolor === 'string' ) {
114
+ } else if ( opts . fillcolor && typeof opts . fillcolor === 'string' ) {
118
115
// doesn't matter what this value is, with a single value
119
116
// we'll make a single fill rect covering the whole bar
120
117
filllevels = [ 0 ] ;
@@ -292,8 +289,7 @@ module.exports = function draw(gd, id) {
292
289
if ( opts . title . side === 'top' ) {
293
290
y = ( 1 - ( yBottomFrac + lenFrac - ypadFrac ) ) * gs . h +
294
291
gs . t + 3 + fontSize * 0.75 ;
295
- }
296
- else {
292
+ } else {
297
293
y = ( 1 - ( yBottomFrac + ypadFrac ) ) * gs . h +
298
294
gs . t - 3 - fontSize * 0.25 ;
299
295
}
@@ -323,8 +319,7 @@ module.exports = function draw(gd, id) {
323
319
// vertical alignment, but this seems to work.
324
320
titleTrans [ 1 ] -= ( titleHeight - lineSize ) / 2 ;
325
321
}
326
- }
327
- else if ( titleText . node ( ) &&
322
+ } else if ( titleText . node ( ) &&
328
323
! titleText . classed ( cn . jsPlaceholder ) ) {
329
324
titleHeight = Drawing . bBox ( titleText . node ( ) ) . height ;
330
325
}
@@ -336,8 +331,7 @@ module.exports = function draw(gd, id) {
336
331
if ( opts . title . side === 'top' ) {
337
332
cbAxisOut . domain [ 1 ] -= titleHeight / gs . h ;
338
333
titleTrans [ 1 ] *= - 1 ;
339
- }
340
- else {
334
+ } else {
341
335
cbAxisOut . domain [ 0 ] += titleHeight / gs . h ;
342
336
var nlines = svgTextUtils . lineCount ( titleText ) ;
343
337
titleTrans [ 1 ] += ( 1 - nlines ) * lineSize ;
@@ -395,8 +389,7 @@ module.exports = function draw(gd, id) {
395
389
if ( opts . fillgradient ) {
396
390
Drawing . gradient ( fillEl , gd , id , 'vertical' ,
397
391
opts . fillgradient , 'fill' ) ;
398
- }
399
- else {
392
+ } else {
400
393
// Tinycolor can't handle exponents and
401
394
// at this scale, removing it makes no difference.
402
395
var colorString = fillcolormap ( d ) . replace ( 'e-' , '' ) ;
@@ -514,8 +507,7 @@ module.exports = function draw(gd, id) {
514
507
if ( mathJaxNode &&
515
508
[ 'top' , 'bottom' ] . indexOf ( opts . title . side ) !== - 1 ) {
516
509
titleWidth = Drawing . bBox ( mathJaxNode ) . width ;
517
- }
518
- else {
510
+ } else {
519
511
// note: the formula below works for all title sides,
520
512
// (except for top/bottom mathjax, above)
521
513
// but the weird gs.l is because the titleunshift
@@ -569,8 +561,7 @@ module.exports = function draw(gd, id) {
569
561
marginOpts . y = opts . y ;
570
562
marginOpts . t = outerheight * tFrac ;
571
563
marginOpts . b = outerheight * bFrac ;
572
- }
573
- else {
564
+ } else {
574
565
marginOpts . t = marginOpts . b = 0 ;
575
566
marginOpts . yt = opts . y + opts . len * tFrac ;
576
567
marginOpts . yb = opts . y - opts . len * bFrac ;
@@ -582,8 +573,7 @@ module.exports = function draw(gd, id) {
582
573
marginOpts . x = opts . x ;
583
574
marginOpts . l = outerwidth * lFrac ;
584
575
marginOpts . r = outerwidth * rFrac ;
585
- }
586
- else {
576
+ } else {
587
577
var extraThickness = outerwidth - thickPx ;
588
578
marginOpts . l = extraThickness * lFrac ;
589
579
marginOpts . r = extraThickness * rFrac ;
0 commit comments