Skip to content

Commit afb0689

Browse files
committed
Increase boundary for significant resize of 3d plot
1 parent 0662219 commit afb0689

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

modules/hist/hist3d.mjs

+2-4
Original file line numberDiff line numberDiff line change
@@ -752,12 +752,10 @@ function resize3D() {
752752
x3d = xy3d * this.x3dscale,
753753
y3d = xy3d * this.y3dscale;
754754

755-
if ((Math.abs(x3d - this.size_x3d) > 0.1*this.size_z3d) || (Math.abs(y3d - this.size_y3d) > 0.1*this.size_z3d)) {
755+
if ((Math.abs(x3d - this.size_x3d) > 0.2*this.size_z3d) || (Math.abs(y3d - this.size_y3d) > 0.2*this.size_z3d)) {
756756
this.size_x3d = x3d;
757757
this.size_y3d = y3d;
758-
const pos = getCameraDefaultPosition(this, true);
759-
if (pos)
760-
this.control.position0.copy(pos);
758+
this.control.position0.copy(getCameraDefaultPosition(this, true));
761759
return 1; // indicate significant resize
762760
}
763761

0 commit comments

Comments
 (0)