@@ -735,19 +735,25 @@ class HistContour {
735
735
return Math . floor ( 0.01 + ( zc - this . colzmin ) * ( this . arr . length - 1 ) / ( this . colzmax - this . colzmin ) ) ;
736
736
737
737
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 ) {
741
743
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 ;
743
748
}
744
749
return l ;
745
750
}
746
751
747
752
/** @summary Get palette color */
748
753
getPaletteColor ( palette , zc ) {
749
754
const zindx = this . getContourIndex ( zc ) ;
750
- if ( zindx < 0 ) return null ;
755
+ if ( zindx < 0 )
756
+ return null ;
751
757
const pindx = palette . calcColorIndex ( zindx , this . arr . length ) ;
752
758
return palette . getColor ( pindx ) ;
753
759
}
@@ -962,12 +968,18 @@ class THistPainter extends ObjectPainter {
962
968
/** @summary Returns number of histogram dimensions */
963
969
getDimension ( ) {
964
970
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 ;
971
983
return 1 ;
972
984
}
973
985
@@ -1238,15 +1250,20 @@ class THistPainter extends ObjectPainter {
1238
1250
if ( axis . fXbins . length >= axis . fNbins ) {
1239
1251
axis . GetBinCoord = function ( bin ) {
1240
1252
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 ] ;
1244
1259
const indx2 = ( bin < indx ) ? indx - 1 : indx + 1 ;
1245
1260
return this . fXbins [ indx ] * Math . abs ( bin - indx2 ) + this . fXbins [ indx2 ] * Math . abs ( bin - indx ) ;
1246
1261
} ;
1247
1262
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
+ }
1250
1267
return this . fNbins ;
1251
1268
} ;
1252
1269
} else {
@@ -1562,8 +1579,10 @@ class THistPainter extends ObjectPainter {
1562
1579
return null ;
1563
1580
1564
1581
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 ;
1567
1586
}
1568
1587
1569
1588
const st = gStyle ;
@@ -2327,7 +2346,8 @@ class THistPainter extends ObjectPainter {
2327
2346
} else {
2328
2347
pal_painter . Enabled = true ;
2329
2348
// real drawing will be perform at the end
2330
- if ( postpone_draw ) return pal_painter ;
2349
+ if ( postpone_draw )
2350
+ return pal_painter ;
2331
2351
pr = pal_painter . drawPave ( arg ) ;
2332
2352
}
2333
2353
0 commit comments