Skip to content

Commit 0e57631

Browse files
committed
Update hpainter example
1 parent 4ff346d commit 0e57631

File tree

1 file changed

+8
-11
lines changed

1 file changed

+8
-11
lines changed

scripts/JSRoot.hierarchy.js

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -443,8 +443,7 @@ JSROOT.define(['d3', 'painter'], (d3, jsrp) => {
443443
}
444444
}
445445
}
446-
} else
447-
if ((typeof fld === 'number') || (typeof fld === 'boolean')) {
446+
} else if ((typeof fld === 'number') || (typeof fld === 'boolean')) {
448447
simple = true;
449448
if (key == 'fBits')
450449
item._value = "0x" + fld.toString(16);
@@ -749,15 +748,13 @@ JSROOT.define(['d3', 'painter'], (d3, jsrp) => {
749748
* @param {string} frameid - element id where hierarchy is drawn
750749
* @param {string} [backgr] - background color
751750
* @example
752-
* // create hierarchy painter in "myTreeDiv"
753-
* let h = new JSROOT.HierarchyPainter("example", "myTreeDiv");
754-
* // configure 'simple' layout in "myMainDiv"
755-
* // one also can specify "grid2x2" or "flex" or "tabs"
756-
* h.setDisplay("simple", "myMainDiv");
757-
* // open file and display element
758-
* h.openRootFile("https://root.cern/js/files/hsimple.root").then(() => h.display("hpxpy;1","colz"));
759-
*/
760-
751+
* // create hierarchy painter in "myTreeDiv"
752+
* let h = new JSROOT.HierarchyPainter("example", "myTreeDiv");
753+
* // configure 'simple' layout in "myMainDiv"
754+
* // one also can specify "grid2x2" or "flex" or "tabs"
755+
* h.setDisplay("simple", "myMainDiv");
756+
* // open file and display element
757+
* h.openRootFile("https://root.cern/js/files/hsimple.root").then(() => h.display("hpxpy;1","colz")); */
761758
function HierarchyPainter(name, frameid, backgr) {
762759
JSROOT.BasePainter.call(this, frameid);
763760
this.name = name;

0 commit comments

Comments
 (0)