Browse Source

fix missing camera radiusMax update

Alexander Rose 4 năm trước cách đây
mục cha
commit
9ef8d0c9f8
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      src/mol-canvas3d/canvas3d.ts

+ 1 - 1
src/mol-canvas3d/canvas3d.ts

@@ -321,7 +321,7 @@ namespace Canvas3D {
                 const duration = nextCameraResetDuration === undefined ? p.cameraResetDurationMs : nextCameraResetDuration;
                 const duration = nextCameraResetDuration === undefined ? p.cameraResetDurationMs : nextCameraResetDuration;
                 const focus = camera.getFocus(center, radius);
                 const focus = camera.getFocus(center, radius);
                 const snapshot = nextCameraResetSnapshot ? { ...focus, ...nextCameraResetSnapshot } : focus;
                 const snapshot = nextCameraResetSnapshot ? { ...focus, ...nextCameraResetSnapshot } : focus;
-                camera.setState(snapshot, duration);
+                camera.setState({ ...snapshot, radiusMax: scene.boundingSphere.radius }, duration);
             }
             }
 
 
             nextCameraResetDuration = void 0;
             nextCameraResetDuration = void 0;