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

PrimitiveCollection.removeAll removes guid #7491

Merged

Conversation

bkuster
Copy link
Contributor

@bkuster bkuster commented Jan 18, 2019

.removeAll broke .contains:

var collection = new Cesium.PrimitiveCollection();
var primitive = new Cesium.Primitive();
collection.add(primitive);
collection.removeAll();
const contained = collection.contains(primitive);
expect(contained).to.be.false // throws

This PR fixes this issue by removing the collection _guid from all its primitves on removeAll

@cesium-concierge
Copy link

Thanks for the pull request @bkuster!

  • ✔️ Signed CLA found.
  • CHANGES.md was not updated.
    • If this change updates the public API in any way, please add a bullet point to CHANGES.md.

Reviewers, don't forget to make sure that:

  • Cesium Viewer works.
  • Works in 2D/CV.
  • Works (or fails gracefully) in IE11.
CHANGES.md Outdated Show resolved Hide resolved
@hpinkos
Copy link
Contributor

hpinkos commented Jan 18, 2019

Good catch @bkuster! Thanks for the pull request. I just had that one comment

@hpinkos
Copy link
Contributor

hpinkos commented Jan 18, 2019

👍 thanks again!

@hpinkos hpinkos merged commit 8da54fb into CesiumGS:master Jan 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants