Skip to content

Commit

Permalink
Update hpainter example
Browse files Browse the repository at this point in the history
  • Loading branch information
linev committed Jan 14, 2021
1 parent 4ff346d commit 0e57631
Showing 1 changed file with 8 additions and 11 deletions.
19 changes: 8 additions & 11 deletions scripts/JSRoot.hierarchy.js
Original file line number Diff line number Diff line change
Expand Up @@ -443,8 +443,7 @@ JSROOT.define(['d3', 'painter'], (d3, jsrp) => {
}
}
}
} else
if ((typeof fld === 'number') || (typeof fld === 'boolean')) {
} else if ((typeof fld === 'number') || (typeof fld === 'boolean')) {
simple = true;
if (key == 'fBits')
item._value = "0x" + fld.toString(16);
Expand Down Expand Up @@ -749,15 +748,13 @@ JSROOT.define(['d3', 'painter'], (d3, jsrp) => {
* @param {string} frameid - element id where hierarchy is drawn
* @param {string} [backgr] - background color
* @example
* // create hierarchy painter in "myTreeDiv"
* let h = new JSROOT.HierarchyPainter("example", "myTreeDiv");
* // configure 'simple' layout in "myMainDiv"
* // one also can specify "grid2x2" or "flex" or "tabs"
* h.setDisplay("simple", "myMainDiv");
* // open file and display element
* h.openRootFile("https://root.cern/js/files/hsimple.root").then(() => h.display("hpxpy;1","colz"));
*/

* // create hierarchy painter in "myTreeDiv"
* let h = new JSROOT.HierarchyPainter("example", "myTreeDiv");
* // configure 'simple' layout in "myMainDiv"
* // one also can specify "grid2x2" or "flex" or "tabs"
* h.setDisplay("simple", "myMainDiv");
* // open file and display element
* h.openRootFile("https://root.cern/js/files/hsimple.root").then(() => h.display("hpxpy;1","colz")); */
function HierarchyPainter(name, frameid, backgr) {
JSROOT.BasePainter.call(this, frameid);
this.name = name;
Expand Down

0 comments on commit 0e57631

Please sign in to comment.