bruce-cesium 4.7.1 → 4.7.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -15060,6 +15060,8 @@
15060
15060
  var regos = this.register.GetRegos({
15061
15061
  menuItemId: this.menuItemId
15062
15062
  });
15063
+ // Reset progress.
15064
+ this.updateStyleProgress();
15063
15065
  this.styleMappingLoaded = false;
15064
15066
  this.styleMappingsLoaded = {};
15065
15067
  this.QueueEntities(regos);
@@ -15181,12 +15183,14 @@
15181
15183
  * Calculates the current progress % and updates the progress if there is a change.
15182
15184
  */
15183
15185
  Styler.prototype.updateStyleProgress = function () {
15184
- var _this = this;
15185
15186
  var progress = 100; // Done when idling.
15186
15187
  if (this.recordCheckQueue.length || this.recordLoadQueue.length) {
15187
15188
  var total = Object.keys(this.styledEntityIds).length;
15188
- var done = Object.keys(this.styledEntityIds).filter(function (x) { return _this.styledEntityIds[x]; }).length;
15189
- progress = Math.round((done / total) * 100);
15189
+ // Done is the total minus the amount left.
15190
+ // We have to ensure the same ID isn't counted within or across these arrays as well.
15191
+ var uniqueSet = new Set(this.recordCheckQueue.concat(this.recordLoadQueue));
15192
+ var done = total - uniqueSet.size;
15193
+ progress = done / total * 100;
15190
15194
  // Round to 2dp, 0, or 100.
15191
15195
  if (progress < 0) {
15192
15196
  progress = 0;
@@ -15440,8 +15444,8 @@
15440
15444
  }
15441
15445
  }
15442
15446
  var _loop_3 = function (i) {
15443
- var hash = batch[i];
15444
- var index = _this.recordCheckQueue.findIndex(function (x) { return x == hash; });
15447
+ var entityId = batch[i];
15448
+ var index = _this.recordCheckQueue.findIndex(function (x) { return x == entityId; });
15445
15449
  if (index > -1) {
15446
15450
  _this.recordCheckQueue.splice(index, 1);
15447
15451
  }
@@ -28180,7 +28184,7 @@
28180
28184
  return WidgetViewBar;
28181
28185
  }(exports.Widget.AWidget));
28182
28186
 
28183
- var VERSION = "4.7.1";
28187
+ var VERSION = "4.7.2";
28184
28188
 
28185
28189
  exports.VERSION = VERSION;
28186
28190
  exports.CesiumParabola = CesiumParabola;