Skip to content

Commit 23bd4be

Browse files
committed
fix(components): 🐛 statusBarEvt of the vc-statu-bar component is not triggered when camera changed.
1 parent 7a861ab commit 23bd4be

File tree

1 file changed

+10
-0
lines changed
  • packages/components/controls/status-bar

1 file changed

+10
-0
lines changed

packages/components/controls/status-bar/index.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,16 @@ export default defineComponent({
199199
cameraInfo.roll = CesiumMath.toDegrees(viewer.camera.roll).toFixed(1)
200200
cameraInfo.height = viewer.camera.positionCartographic.height.toFixed(2)
201201
cameraInfo.level = heightToLevel(Number(cameraInfo.height)).toFixed(0)
202+
203+
204+
const listener = getInstanceListener(instance, 'statusBarEvt')
205+
listener &&
206+
ctx.emit('statusBarEvt', {
207+
type: 'statusBar',
208+
mouseCoordsInfo: mouseCoordsInfo.value,
209+
cameraInfo: cameraInfo,
210+
performanceInfo: performanceInfo
211+
})
202212
}
203213

204214
const onMouseMove = e => {

0 commit comments

Comments
 (0)