Skip to content

Commit 3e2b491

Browse files
committed
Some cleanup
1 parent 3bf212a commit 3e2b491

File tree

1 file changed

+10
-11
lines changed

1 file changed

+10
-11
lines changed

modules/geom/TGeoPainter.mjs

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -847,7 +847,7 @@ class TGeoPainter extends ObjectPainter {
847847
exact = false;
848848
}
849849

850-
this.findNodeWithVolume(regexp, function(arg) {
850+
this.findNodeWithVolume(regexp, arg => {
851851
setInvisibleAll(arg.node.fVolume, (sign !== '+'));
852852
return exact ? arg : null; // continue search if not exact expression provided
853853
});
@@ -1283,11 +1283,10 @@ class TGeoPainter extends ObjectPainter {
12831283
mesh.getMatrixAt(i, item.matrix0);
12841284
item.minvert.copy(item.matrix0).invert();
12851285

1286-
let box3 = new Box3().copy(mesh.geometry.boundingBox).applyMatrix4(item.matrix0),
1287-
signz = 1; //mesh._flippedMesh ? -1 : 1;
1286+
let box3 = new Box3().copy(mesh.geometry.boundingBox).applyMatrix4(item.matrix0);
12881287

1289-
item.vect0 = new Vector3((box3.max.x + box3.min.x) / 2, (box3.max.y + box3.min.y) / 2, signz * (box3.max.z + box3.min.z) / 2);// .applyMatrix4(item.matrix0);
1290-
item.vect1 = new Vector3(0,0,0).applyMatrix4(item.minvert);
1288+
item.vect0 = new Vector3((box3.max.x + box3.min.x) / 2, (box3.max.y + box3.min.y) / 2, (box3.max.z + box3.min.z) / 2);
1289+
item.vect1 = new Vector3(0, 0, 0).applyMatrix4(item.minvert);
12911290
}
12921291
}
12931292

@@ -1760,14 +1759,14 @@ class TGeoPainter extends ObjectPainter {
17601759
let wireframe = this.accessObjectWireFrame(obj);
17611760

17621761
if (wireframe !== undefined)
1763-
menu.addchk(wireframe, 'Wireframe', n, function(indx) {
1762+
menu.addchk(wireframe, 'Wireframe', n, indx => {
17641763
let m = intersects[indx].object.material;
17651764
m.wireframe = !m.wireframe;
17661765
this.render3D();
1767-
});
1766+
}, 'Toggle wireframe mode for the node');
17681767

17691768
if (cnt > 1)
1770-
menu.add('Manifest', n, function(indx) {
1769+
menu.add('Manifest', n, indx => {
17711770

17721771
if (this._last_manifest)
17731772
this._last_manifest.wireframe = !this._last_manifest.wireframe;
@@ -1787,15 +1786,15 @@ class TGeoPainter extends ObjectPainter {
17871786
this._last_manifest.wireframe = !this._last_manifest.wireframe;
17881787

17891788
this.render3D();
1790-
});
1789+
}, 'Manifest selected node');
17911790

17921791

1793-
menu.add('Focus', n, function(indx) {
1792+
menu.add('Focus', n, indx => {
17941793
this.focusCamera(intersects[indx].object);
17951794
});
17961795

17971796
if (!this._geom_viewer) {
1798-
menu.add('Hide', n, function(indx) {
1797+
menu.add('Hide', n, indx => {
17991798
let resolve = this._clones.resolveStack(intersects[indx].object.stack);
18001799
if (resolve.obj && (resolve.node.kind === kindGeo) && resolve.obj.fVolume) {
18011800
setGeoBit(resolve.obj.fVolume, geoBITS.kVisThis, false);

0 commit comments

Comments
 (0)