clone bounds to prevent altering cached object during platform bounds computation

This commit is contained in:
Stewart Allen 2022-11-12 19:30:47 -05:00
commit 9cd7f52f5c
2 changed files with 1 additions and 2 deletions

View file

@ -1683,7 +1683,6 @@ function updateStock() {
const { x, y, z, center } = stock;
UI.func.animate.classList.add('disabled');
if (x && y && z) {
UI.func.animate.classList.remove('disabled');
if (!camStock) {

View file

@ -197,7 +197,7 @@ function platformUpdateBounds() {
const bounds = new THREE.Box3();
api.widgets.each(widget => {
let wp = widget.track.pos;
let wb = widget.getBoundingBox();
let wb = widget.getBoundingBox().clone();
wb.min.x += wp.x;
wb.max.x += wp.x;
wb.min.y += wp.y;