Skip to content

Commit f1e6ef1

Browse files
committed
Fix - correctly parse "optstat" and "optfit" in URL
1 parent ac77b58 commit f1e6ef1

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

scripts/JSRootPainter.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -482,8 +482,10 @@
482482
if (JSROOT.GetUrlOption("notouch", url)!=null) JSROOT.touches = false;
483483
if (JSROOT.GetUrlOption("adjframe", url)!=null) JSROOT.gStyle.CanAdjustFrame = true;
484484

485-
JSROOT.gStyle.fOptStat = JSROOT.GetUrlOption("optstat", url, JSROOT.gStyle.fOptStat);
486-
JSROOT.gStyle.fOptFit = JSROOT.GetUrlOption("optfit", url, JSROOT.gStyle.fOptFit);
485+
var optstat = JSROOT.GetUrlOption("optstat", url);
486+
if (optstat!==null) JSROOT.gStyle.fOptStat = parseInt(optstat);
487+
var optfit = JSROOT.GetUrlOption("optfit", url);
488+
if (optfit!==null) JSROOT.gStyle.fOptFit = parseInt(optfit);
487489
JSROOT.gStyle.fStatFormat = JSROOT.GetUrlOption("statfmt", url, JSROOT.gStyle.fStatFormat);
488490
JSROOT.gStyle.fFitFormat = JSROOT.GetUrlOption("fitfmt", url, JSROOT.gStyle.fFitFormat);
489491

0 commit comments

Comments
 (0)