Skip to content

Commit 839065c

Browse files
committed
Draw geo hits using promises
1 parent 5740436 commit 839065c

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

scripts/JSRoot.geom.js

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2966,16 +2966,17 @@ JSROOT.define(['d3', 'three', 'geobase', 'painter', 'base3d'], (d3, THREE, geo,
29662966
projy ? projv : hit.fP[i*3+1],
29672967
projz ? projv : hit.fP[i*3+2]);
29682968

2969-
let mesh = pnts.createPoints({ color: jsrp.getColor(hit.fMarkerColor) || "rgb(0,0,255)", style: hit_style });
2970-
mesh.renderOrder = 1000000; // to bring points to the front
2971-
mesh.highlightScale = 2;
2972-
mesh.geo_name = itemname;
2973-
mesh.geo_object = hit;
2974-
this.addToExtrasContainer(mesh);
2975-
2976-
return true; // indicate that rendering should be done
2969+
return pnts.createPoints({ color: jsrp.getColor(hit.fMarkerColor) || "rgb(0,0,255)", style: hit_style, promise:true }).then(mesh => {
2970+
mesh.renderOrder = 1000000; // to bring points to the front
2971+
mesh.highlightScale = 2;
2972+
mesh.geo_name = itemname;
2973+
mesh.geo_object = hit;
2974+
this.addToExtrasContainer(mesh);
2975+
return true; // indicate that rendering should be done
2976+
});
29772977
}
29782978

2979+
/** @summary Draw extra shape on the geometry */
29792980
TGeoPainter.prototype.drawExtraShape = function(obj, itemname) {
29802981
let toplevel = geo.build(obj);
29812982
if (!toplevel) return false;

0 commit comments

Comments
 (0)