Skip to content

Commit

Permalink
fix(components): 🐛 statusBarEvt of the vc-statu-bar component is …
Browse files Browse the repository at this point in the history
…not triggered when camera changed.
  • Loading branch information
zouyaoji committed May 13, 2024
1 parent 7a861ab commit 23bd4be
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions packages/components/controls/status-bar/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 => {
Expand Down

0 comments on commit 23bd4be

Please sign in to comment.