Skip to content
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

Merged
merged 9 commits into from
Aug 7, 2017
Merged

Fixed error with models when globe is undefined #5655

merged 9 commits into from
Aug 7, 2017

Conversation

ggetz
Copy link
Contributor

@ggetz ggetz commented Jul 19, 2017

Fixes #5638

Has Scene.js check if globe is defined before accessing it properties, and also has Model.js check if the terrainProviderChanged event is defined before subscribing.

@ggetz
Copy link
Contributor Author

ggetz commented Jul 19, 2017

@mramato Can you review when you get a chance? (I can't assign reviewers directly)

@hpinkos
Copy link
Contributor

hpinkos commented Jul 19, 2017

This looks good to me @ggetz! It looks like BillboardCollection needs the same change, want to do that as well?

@ggetz
Copy link
Contributor Author

ggetz commented Jul 19, 2017

@hpinkos Sure

@ggetz
Copy link
Contributor Author

ggetz commented Jul 19, 2017

@hpinkos Updated!

@hpinkos
Copy link
Contributor

hpinkos commented Jul 20, 2017

@ggetz merge in master

@ggetz
Copy link
Contributor Author

ggetz commented Jul 20, 2017

@hpinkos Merged!

@@ -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() {
Copy link
Contributor

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

@hpinkos
Copy link
Contributor

hpinkos commented Jul 20, 2017

And add specs. And after that I think this will be ready =)

@ggetz
Copy link
Contributor Author

ggetz commented Jul 24, 2017

Thanks @hpinkos, updated!

@ggetz
Copy link
Contributor Author

ggetz commented Aug 4, 2017

@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)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove these

@ggetz
Copy link
Contributor Author

ggetz commented Aug 7, 2017

Fixed, thanks!

@hpinkos
Copy link
Contributor

hpinkos commented Aug 7, 2017

Thanks @ggetz !

@hpinkos hpinkos merged commit d949a01 into CesiumGS:master Aug 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants