Skip to content

Commit

Permalink
fix: the vc-overlay-html component is not displayed properly in 2D …
Browse files Browse the repository at this point in the history
…SceneMode
  • Loading branch information
zouyaoji committed Mar 2, 2023
1 parent 82542a9 commit cdfbcf1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/components/overlays/html/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ export default defineComponent({
rootStyle.left = canvasPosition.x + offset.value.x + 'px'
rootStyle.top = canvasPosition.y + offset.value.y + 'px'

if (props.autoHidden) {
if (props.autoHidden && viewer.scene.mode !== Cesium.SceneMode.SCENE2D && viewer.scene.mode !== Cesium.SceneMode.MORPHING) {
const cameraPosition = viewer.camera.position
const cartographicPosition = viewer.scene.globe.ellipsoid.cartesianToCartographic(cameraPosition)
if (Cesium.defined(cartographicPosition)) {
Expand Down

0 comments on commit cdfbcf1

Please sign in to comment.