Skip to content

Commit a49d6f3

Browse files
committed
Add support of TPolyMarker3D on TCanvas with geom
1 parent f5a2238 commit a49d6f3

File tree

2 files changed

+13
-5
lines changed

2 files changed

+13
-5
lines changed

scripts/JSRoot.geom.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3259,13 +3259,13 @@ JSROOT.define(['d3', 'three', 'geobase', 'painter', 'base3d'], (d3, THREE, geo,
32593259
let dom = this.createScene(size.width, size.height);
32603260

32613261
this.add3dCanvas(size, dom, this._webgl);
3262-
3263-
// set top painter only when first child exists
3264-
this.setAsMainPainter();
32653262
}
32663263
}
32673264

32683265
return promise.then(() => {
3266+
// set top painter only when first child exists
3267+
this.setAsMainPainter();
3268+
32693269
this.createToolbar();
32703270

32713271
if (this._clones)

scripts/JSRoot.hist3d.js

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3374,10 +3374,18 @@ JSROOT.define(['d3', 'painter', 'base3d', 'latex', 'hist'], (d3, jsrp, THREE, lt
33743374

33753375
let fp = this.getFramePainter();
33763376

3377-
if (!fp || !fp.mode3d || !fp.toplevel)
3377+
let step = 1, sizelimit = 50000, numselect = 0, poly = this.getObject();
3378+
3379+
3380+
if (!fp || !fp.mode3d)
33783381
return Promise.reject(Error("Fail to draw poly markers without 3D mode"));
33793382

3380-
let step = 1, sizelimit = 50000, numselect = 0, poly = this.getObject();
3383+
if (!fp.toplevel) {
3384+
let main = this.getMainPainter();
3385+
if (main && typeof main.drawExtras == 'function')
3386+
return main.drawExtras(poly);
3387+
return Promise.resolve(this);
3388+
}
33813389

33823390
for (let i = 0; i < poly.fP.length; i += 3) {
33833391
if ((poly.fP[i] < fp.scale_xmin) || (poly.fP[i] > fp.scale_xmax) ||

0 commit comments

Comments
 (0)