!2887 修复 ios 16.4以下系统因为不支持orientation无法正常加载

pull/2856/MERGE
cf-erp 3 months ago committed by ChenX
parent 2bd7d6f5ff
commit f4f3e3740c

@ -84,13 +84,16 @@ export class ShareViewCameraControl extends CameraControls
{
// ShareView中用更改FOV的方式替换原有的透视相机缩放逻辑CameraControl难以重写
this.Viewer.CameraControl.Fov = clamp(this.Viewer.CameraControl.Fov * scale, this.minFov, this.maxFov);
if (screen.orientation.type.startsWith("portrait"))
if (screen.orientation)
{
this.shareViewStore.userFovPortrait = scale;
}
else if (screen.orientation.type.startsWith("landscape"))
{
this.shareViewStore.userFovLandscape = scale;
if (screen.orientation.type.startsWith("portrait"))
{
this.shareViewStore.userFovPortrait = scale;
}
else if (screen.orientation.type.startsWith("landscape"))
{
this.shareViewStore.userFovLandscape = scale;
}
}
}
else

@ -66,6 +66,7 @@ function HouseRoamingButton()
shareViewStore.userFovLandscape = defaultFovLandscape;
function initFov()
{
if (!screen.orientation) return;
if (screen.orientation.type.startsWith("portrait"))
shareViewApp.Viewer.CameraCtrl.Fov = shareViewStore.userFovPortrait;
else if (screen.orientation.type.startsWith("landscape"))

Loading…
Cancel
Save