Skip to content

Commit

Permalink
Bugfix for early autozoom edge case V2
Browse files Browse the repository at this point in the history
  • Loading branch information
gjcope committed May 3, 2022
1 parent 54c3ffb commit bdca96f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion source/client/components/CVOrbitNavigation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,10 @@ export default class CVOrbitNavigation extends CObject3D
/*edge case when loaded event triggers before document parsing */
}
else {
controller.camera = cameraComponent.camera;
// Hack until we have a better way to make sure camera is initialized on first zoom
cameraComponent.camera.aspect = controller.camera.aspect;

controller.camera = cameraComponent.camera;
controller.zoomExtents(this._modelBoundingBox);
cameraComponent.ins.zoom.set();
}
Expand Down

0 comments on commit bdca96f

Please sign in to comment.