@@ -735,19 +735,25 @@ class HistContour {
735735 return Math . floor ( 0.01 + ( zc - this . colzmin ) * ( this . arr . length - 1 ) / ( this . colzmax - this . colzmin ) ) ;
736736
737737 let l = 0 , r = this . arr . length - 1 ;
738- if ( zc < this . arr [ 0 ] ) return - 1 ;
739- if ( zc >= this . arr [ r ] ) return r ;
740- while ( l < r - 1 ) {
738+ if ( zc < this . arr [ 0 ] )
739+ return - 1 ;
740+ if ( zc >= this . arr [ r ] )
741+ return r ;
742+ while ( l < r - 1 ) {
741743 const mid = Math . round ( ( l + r ) / 2 ) ;
742- if ( this . arr [ mid ] > zc ) r = mid ; else l = mid ;
744+ if ( this . arr [ mid ] > zc )
745+ r = mid ;
746+ else
747+ l = mid ;
743748 }
744749 return l ;
745750 }
746751
747752 /** @summary Get palette color */
748753 getPaletteColor ( palette , zc ) {
749754 const zindx = this . getContourIndex ( zc ) ;
750- if ( zindx < 0 ) return null ;
755+ if ( zindx < 0 )
756+ return null ;
751757 const pindx = palette . calcColorIndex ( zindx , this . arr . length ) ;
752758 return palette . getColor ( pindx ) ;
753759 }
@@ -962,12 +968,18 @@ class THistPainter extends ObjectPainter {
962968 /** @summary Returns number of histogram dimensions */
963969 getDimension ( ) {
964970 const histo = this . getHisto ( ) ;
965- if ( ! histo ) return 0 ;
966- if ( histo . _typename . match ( / ^ T H 2 / ) ) return 2 ;
967- if ( histo . _typename === clTProfile2D ) return 2 ;
968- if ( histo . _typename . match ( / ^ T H 3 / ) ) return 3 ;
969- if ( histo . _typename === clTProfile3D ) return 3 ;
970- if ( this . isTH2Poly ( ) ) return 2 ;
971+ if ( ! histo )
972+ return 0 ;
973+ if ( histo . _typename . match ( / ^ T H 2 / ) )
974+ return 2 ;
975+ if ( histo . _typename === clTProfile2D )
976+ return 2 ;
977+ if ( histo . _typename . match ( / ^ T H 3 / ) )
978+ return 3 ;
979+ if ( histo . _typename === clTProfile3D )
980+ return 3 ;
981+ if ( this . isTH2Poly ( ) )
982+ return 2 ;
971983 return 1 ;
972984 }
973985
@@ -1238,15 +1250,20 @@ class THistPainter extends ObjectPainter {
12381250 if ( axis . fXbins . length >= axis . fNbins ) {
12391251 axis . GetBinCoord = function ( bin ) {
12401252 const indx = Math . round ( bin ) ;
1241- if ( indx <= 0 ) return this . fXmin ;
1242- if ( indx > this . fNbins ) return this . fXmax ;
1243- if ( indx === bin ) return this . fXbins [ indx ] ;
1253+ if ( indx <= 0 )
1254+ return this . fXmin ;
1255+ if ( indx > this . fNbins )
1256+ return this . fXmax ;
1257+ if ( indx === bin )
1258+ return this . fXbins [ indx ] ;
12441259 const indx2 = ( bin < indx ) ? indx - 1 : indx + 1 ;
12451260 return this . fXbins [ indx ] * Math . abs ( bin - indx2 ) + this . fXbins [ indx2 ] * Math . abs ( bin - indx ) ;
12461261 } ;
12471262 axis . FindBin = function ( x , add ) {
1248- for ( let k = 1 ; k < this . fXbins . length ; ++ k )
1249- if ( x < this . fXbins [ k ] ) return Math . floor ( k - 1 + add ) ;
1263+ for ( let k = 1 ; k < this . fXbins . length ; ++ k ) {
1264+ if ( x < this . fXbins [ k ] )
1265+ return Math . floor ( k - 1 + add ) ;
1266+ }
12501267 return this . fNbins ;
12511268 } ;
12521269 } else {
@@ -1562,8 +1579,10 @@ class THistPainter extends ObjectPainter {
15621579 return null ;
15631580
15641581 if ( ! force && ! o . ForceStat ) {
1565- if ( o . NoStat || histo . TestBit ( kNoStats ) || ! settings . AutoStat ) return null ;
1566- if ( ! this . isMainPainter ( ) ) return null ;
1582+ if ( o . NoStat || histo . TestBit ( kNoStats ) || ! settings . AutoStat )
1583+ return null ;
1584+ if ( ! this . isMainPainter ( ) )
1585+ return null ;
15671586 }
15681587
15691588 const st = gStyle ;
@@ -2327,7 +2346,8 @@ class THistPainter extends ObjectPainter {
23272346 } else {
23282347 pal_painter . Enabled = true ;
23292348 // real drawing will be perform at the end
2330- if ( postpone_draw ) return pal_painter ;
2349+ if ( postpone_draw )
2350+ return pal_painter ;
23312351 pr = pal_painter . drawPave ( arg ) ;
23322352 }
23332353
0 commit comments