Skip to content

Commit

Permalink
Increase boundary for significant resize of 3d plot
Browse files Browse the repository at this point in the history
  • Loading branch information
linev committed Jan 15, 2025
1 parent 0662219 commit afb0689
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions modules/hist/hist3d.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -752,12 +752,10 @@ function resize3D() {
x3d = xy3d * this.x3dscale,
y3d = xy3d * this.y3dscale;

if ((Math.abs(x3d - this.size_x3d) > 0.1*this.size_z3d) || (Math.abs(y3d - this.size_y3d) > 0.1*this.size_z3d)) {
if ((Math.abs(x3d - this.size_x3d) > 0.2*this.size_z3d) || (Math.abs(y3d - this.size_y3d) > 0.2*this.size_z3d)) {
this.size_x3d = x3d;
this.size_y3d = y3d;
const pos = getCameraDefaultPosition(this, true);
if (pos)
this.control.position0.copy(pos);
this.control.position0.copy(getCameraDefaultPosition(this, true));
return 1; // indicate significant resize
}

Expand Down

0 comments on commit afb0689

Please sign in to comment.