Skip to content

Commit 83b6c05

Browse files
committed
1. nostat option should disable only TPaveStats drawings, other functions
should be drawn git-svn-id: https://subversion.gsi.de/dabc/trunk/plugins/root/js@3159 bcbf6573-9a26-0410-9ebc-ce4ab7aade96
1 parent 5d8f78d commit 83b6c05

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

scripts/JSRootPainter.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4584,8 +4584,9 @@
45844584
// if (this.options.Func == 0) return; // in some cases on need to disable
45854585
// functions drawing
45864586

4587-
// do not draw functions when 'same' option was used of kNoStats bit is set
4588-
if (this.histo.TestBit(JSROOT.TH1StatusBits.kNoStats) || (this.options.Same==1) || (this.options.NoStat==1)) return;
4587+
// do not draw functions when 'same' option was used
4588+
if (this.options.Same) return;
4589+
var nostat = this.histo.TestBit(JSROOT.TH1StatusBits.kNoStats) || (this.options.NoStat==1);
45894590

45904591
var lastpainter = this;
45914592

@@ -4605,15 +4606,15 @@
46054606
for ( var i in this.histo.fFunctions.arr) {
46064607

46074608
var func = this.histo.fFunctions.arr[i];
4608-
4609+
46094610
var funcpainter = this.FindPainterFor(func);
46104611

46114612
// no need to do something if painter for object was already done
46124613
// object will be redraw automatically
46134614
if (funcpainter != null) continue;
46144615

46154616
if (func['_typename'] == 'TPaveText' || func['_typename'] == 'TPaveStats') {
4616-
funcpainter = JSROOT.Painter.drawPaveText(this.divid, func);
4617+
if (!nostat) funcpainter = JSROOT.Painter.drawPaveText(this.divid, func);
46174618
} else
46184619

46194620
if (func['_typename'] == 'TF1') {
@@ -6239,7 +6240,7 @@
62396240
this.DrawBins();
62406241

62416242
if (this.create_canvas) this.DrawTitle();
6242-
6243+
62436244
this.DrawFunctions();
62446245

62456246
this.AddInteractive();

0 commit comments

Comments
 (0)