Fix allowPartial parameter handling in getBoundingSphere to prevent blocking by other visualizers in update function #12230
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This pull request addresses a bug in the getBoundingSphere method where the allowPartial parameter was not functioning correctly. The issue caused the bounding sphere creation for one entity to be blocked by another entity belonging to a different visualizer that is not ready, even when allowPartial was set to true. This, combined with the fact that the allowPartial parameter being set to false when creating a boundingSphere for the tracked entity, resulted in the flicker bug seen in issue Issue 4647 and Community Forum Post 35516. The tracked entity was unable to get its bounding sphere if the Polyline was being drawn at the same time.
Changes Made:
Added a check for !allowPartial before setting the BoundingSphereState to PENDING in the getBoundingSphere method.
Tested:
Ensured that the method does not halt and return pending if allowPartial is true even when the desired visualizer is ready.
Tested with Cesium Sandcastle Provided in Community Forum Post 35516
(For some reason i cant get the 2016 issue sandcastle working locally on my mac even when im on the main branch so ive been unable to test it with that)
Issue number and link
4647 #4647
35516 https://community.cesium.com/t/how-to-fix-flicker-upon-updating-position-of-an-entity/35516
Testing plan
I used the example cesium sandcastle code provided in the community forum post and visually verified the flicker is no longer there.
Author checklist
CONTRIBUTORS.md
CHANGES.md
with a short summary of my change