zouyaoji / vue-cesium

🎉 Vue 3.x components for CesiumJS.
https://zouyaoji.top/vue-cesium
MIT License
1.47k stars 317 forks source link

[Bug Report] Viewer init by pass the viewerCreator prop #310

Closed xyx650 closed 1 year ago

xyx650 commented 1 year ago

VueCesium version

2.4.0

OS/Browsers version

MacOS / Chrome @latest

Vue version

2.7.13

Cesium version

1.99.0

Reproduction Link

https://codepen.io/zouyaoji/pen/bGBOy

Steps to reproduce

What is Expected?

the container will be initialized successfully

What is actually happening?

Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'globe')

at VueComponent.init (index.js?c2d3:893:1)

at _callee4$ (index.js?c2d3:1341:1)

at tryCatch (regeneratorRuntime.js?eb90:50:1)

at Generator.eval (regeneratorRuntime.js?eb90:131:1)

at Generator.eval [as next] (regeneratorRuntime.js?eb90:75:1)

at asyncGeneratorStep (asyncToGenerator.js?f0ec:4:1)

at _next (asyncToGenerator.js?f0ec:23:1)

source file: Viewer.vue

at line 737 : this.viewer = this.viewerCreator(this, $el, options)

but behind line 757: viewer.scene.globe.terrainExaggeration = terrainExaggeration

the object viewer is '{}' now

zouyaoji commented 1 year ago

Thanks for the feedback, it will be fixed in version 2.4.1

zouyaoji commented 1 year ago

Fixed in v2.4.1