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

Make CartesianX.packArray() compatible with typed arrays #8568

Merged
merged 7 commits into from
Feb 26, 2020

Conversation

ptrgags
Copy link
Contributor

@ptrgags ptrgags commented Jan 27, 2020

This fixes a bug where CartesianX.packArray() cannot be used on a typed array because it attempts to set array.length. This property is read-only for typed arrays like Float64Array

This PR fixes this for all three types of Cartesian vectors. It also updates the packing unit tests to make sure all three classes have the same set of packing tests.

Sandcastle example (Cartesian3 only)

@cesium-concierge
Copy link

Thanks for the pull request @ptrgags!

  • ✔️ 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.

@hpinkos
Copy link
Contributor

hpinkos commented Feb 26, 2020

Thanks @ptrgags !

@hpinkos hpinkos merged commit e1cabc0 into master Feb 26, 2020
@hpinkos hpinkos deleted the fix-cartesian-pack-array branch February 26, 2020 21:04
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.

3 participants