We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent efa6602 commit 8615af6Copy full SHA for 8615af6
demo/node/hpainter.js
@@ -1,14 +1,18 @@
1
-import { version, HierarchyPainter } from 'jsroot';
+import { version, HierarchyPainter, draw } from 'jsroot';
2
3
4
console.log(`JSROOT version ${version}`);
5
6
7
-const hp = new HierarchyPainter('batch', null);
+const hp = new HierarchyPainter('hpainter');
8
9
+// configure batch display to properly handle DOM in the node.js
10
+hp.setDisplay('batch');
11
+
12
+// catch draw function calls
13
hp.setDrawFunc((dom, obj, opt) => {
14
console.log(`trying to draw ${obj._typename}`);
- return null;
15
+ return draw(dom, obj, opt);
16
});
17
18
await hp.openRootFile('https://root.cern/js/files/hsimple.root');
0 commit comments