Would some one explain how to properly use suspendEvents()/resumeEvents() on an Entity Collection? I may just not be understanding their purposes properly. If a suspendEvents() is called on an Entity Collection I assumed that no entities would be able to be added/removed/changed until resumeEvents() is called. From what I can see this is not what's happening though. Looking at the example below I checked the entity collection values array after the remove loop and the entity collection had the entities removed.
for(var index = 0; index < 10; index++){
viewer.entities.add(new Cesium.Entity());
}
viewer.entities.suspendEvents();
for(var removeCounter = 0; removeCounter < 5; removeCounter++){
viewer.entities.remove(viewer.entities.values[removeCounter]);
}
viewer.entities.add(new Cesium.Entity());
viewer.entities.resumeEvents();
Can some one fill me in on the purpose of suspendEvents/resumeEvents? Thanks.