From 23bd4be681c7b71df2daa96f38c76762ee689c77 Mon Sep 17 00:00:00 2001 From: zouyaoji <370681295@qq.com> Date: Mon, 13 May 2024 16:32:20 +0800 Subject: [PATCH] fix(components): :bug: `statusBarEvt` of the `vc-statu-bar` component is not triggered when camera changed. --- packages/components/controls/status-bar/index.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/packages/components/controls/status-bar/index.ts b/packages/components/controls/status-bar/index.ts index 195d91e0..b02b9c60 100644 --- a/packages/components/controls/status-bar/index.ts +++ b/packages/components/controls/status-bar/index.ts @@ -199,6 +199,16 @@ export default defineComponent({ cameraInfo.roll = CesiumMath.toDegrees(viewer.camera.roll).toFixed(1) cameraInfo.height = viewer.camera.positionCartographic.height.toFixed(2) cameraInfo.level = heightToLevel(Number(cameraInfo.height)).toFixed(0) + + + const listener = getInstanceListener(instance, 'statusBarEvt') + listener && + ctx.emit('statusBarEvt', { + type: 'statusBar', + mouseCoordsInfo: mouseCoordsInfo.value, + cameraInfo: cameraInfo, + performanceInfo: performanceInfo + }) } const onMouseMove = e => {