-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixed error with models when globe is undefined #5655
Conversation
@mramato Can you review when you get a chance? (I can't assign reviewers directly) |
This looks good to me @ggetz! It looks like |
@hpinkos Sure |
@hpinkos Updated! |
@ggetz merge in master |
@hpinkos Merged! |
Source/Scene/Model.js
Outdated
@@ -528,7 +528,7 @@ define([ | |||
this._removeUpdateHeightCallback = undefined; | |||
var scene = options.scene; | |||
this._scene = scene; | |||
if (defined(scene)) { | |||
if (defined(scene) && defined(scene.terrainProviderChanged)) { | |||
scene.terrainProviderChanged.addEventListener(function() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This event listener needs to be removed in Model.prototype.destroy
And add specs. And after that I think this will be ready =) |
Thanks @hpinkos, updated! |
@hpinkos Could you take another look at this when you get the chance? |
CHANGES.md
Outdated
@@ -40,6 +41,8 @@ Change Log | |||
* Updated `Billboard`, `Label` and `PointPrimitive` constructors to clone `NearFarScale` parameters [#5654](https://github.com/AnalyticalGraphicsInc/cesium/pull/5654) | |||
* Added `FrustumGeometry` and `FrustumOutlineGeometry`. [#5649](https://github.com/AnalyticalGraphicsInc/cesium/pull/5649) | |||
* Added an `options` parameter to the constructors of `PerspectiveFrustum`, `PerspectiveOffCenterFrustum`, `OrthographicFrustum`, and `OrthographicOffCenterFrustum` to set properties. [#5649](https://github.com/AnalyticalGraphicsInc/cesium/pull/5649) | |||
* Added `ClassificationPrimitive` which defines a volume and draws the intersection of the volume and terrain or 3D Tiles. [#5625](https://github.com/AnalyticalGraphicsInc/cesium/pull/5625) | |||
* Fix for dynamic polylines with polyline dash material [#5681](https://github.com/AnalyticalGraphicsInc/cesium/pull/5681) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove these
Fixed, thanks! |
Thanks @ggetz ! |
Fixes #5638
Has
Scene.js
check ifglobe
is defined before accessing it properties, and also hasModel.js
check if theterrainProviderChanged
event is defined before subscribing.