Skip to content

Commit 3d5be31

Browse files
committed
Adjust TPolyMarker3D drawing
1 parent a49d6f3 commit 3d5be31

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

scripts/JSRoot.hist3d.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3372,21 +3372,21 @@ JSROOT.define(['d3', 'painter', 'base3d', 'latex', 'hist'], (d3, jsrp, THREE, lt
33723372

33733373
jsrp.drawPolyMarker3D = function() {
33743374

3375-
let fp = this.getFramePainter();
3375+
let fp = this.getFramePainter(),
3376+
poly = this.getObject();
33763377

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

33833381
if (!fp.toplevel) {
33843382
let main = this.getMainPainter();
33853383
if (main && typeof main.drawExtras == 'function')
33863384
return main.drawExtras(poly);
3387-
return Promise.resolve(this);
3385+
return null;
33883386
}
33893387

3388+
let step = 1, sizelimit = 50000, numselect = 0;
3389+
33903390
for (let i = 0; i < poly.fP.length; i += 3) {
33913391
if ((poly.fP[i] < fp.scale_xmin) || (poly.fP[i] > fp.scale_xmax) ||
33923392
(poly.fP[i+1] < fp.scale_ymin) || (poly.fP[i+1] > fp.scale_ymax) ||

0 commit comments

Comments
 (0)