Merge pull request #409 from GridSpace/selection-bugfix

fix multi-widget bounding box accuracy
This commit is contained in:
Stewart Allen 2025-08-19 15:58:22 -07:00 • committed by GitHub
commit fc1c981362
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -49,8 +49,12 @@ function update_info() {
const ui = api.ui;
let bounds = new THREE.Box3(), track;
for_meshes(mesh => {
bounds = bounds.union(mesh.getBoundingBox());
let box = mesh.getBoundingBox().clone();
track = mesh.widget.track;
let {pos} = track
box.min.add(pos);
box.max.add(pos);
bounds = bounds.union(box);
});
if (bounds.min.x === Infinity) {
if (selectedMeshes.length === 0) {