Skip to content

Commit 4aeafc3

Browse files
committed
fix: reset vertical exaggeration to 1 when terrain is disabled and guard against undefined scale
1 parent 2d5ba6d commit 4aeafc3

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

src/engines/Cesium/index.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,6 @@ const Cesium: React.ForwardRefRenderFunction<EngineRef, EngineProps> = (
120120
onMount,
121121
onCreditsUpdate,
122122
});
123-
124123
return (
125124
<Viewer
126125
ref={cesium}
@@ -254,7 +253,7 @@ const Cesium: React.ForwardRefRenderFunction<EngineRef, EngineProps> = (
254253
debugShowFramesPerSecond={!!property?.debug?.showFramesPerSecond}
255254
verticalExaggerationRelativeHeight={property?.scene?.verticalExaggerationRelativeHeight}
256255
verticalExaggeration={
257-
property?.terrain?.enabled ? property?.scene?.verticalExaggeration : 1
256+
property?.terrain?.enabled ? (property?.scene?.verticalExaggeration ?? 1) : 1
258257
}
259258
/>
260259
<SkyBox show={property?.sky?.skyBox?.show ?? true} />

0 commit comments

Comments
 (0)