bruce-models 0.5.3 → 0.5.5

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.
@@ -3458,6 +3458,7 @@ var EntityFilterGetter;
3458
3458
  this.batchSize = batchSize;
3459
3459
  this.viewPort = viewPort;
3460
3460
  this.attrFilter = attrFilter;
3461
+ this.updateBounds();
3461
3462
  }
3462
3463
  Object.defineProperty(Getter.prototype, "OnUpdate", {
3463
3464
  get: function () {
@@ -3724,9 +3725,9 @@ var BatchedDataGetter;
3724
3725
  this.viewPort = viewPort;
3725
3726
  this.batchSize = batchSize;
3726
3727
  this.viewPortRemoval = this.viewPort.Updated().Subscribe(function () {
3727
- _this.updateBounds();
3728
- _this.startGetterLoop();
3728
+ _this.updateViewport();
3729
3729
  });
3730
+ this.updateViewport();
3730
3731
  }
3731
3732
  Object.defineProperty(Getter.prototype, "OnUpdate", {
3732
3733
  get: function () {
@@ -3738,6 +3739,10 @@ var BatchedDataGetter;
3738
3739
  enumerable: false,
3739
3740
  configurable: true
3740
3741
  });
3742
+ Getter.prototype.updateViewport = function () {
3743
+ this.updateBounds();
3744
+ this.startGetterLoop();
3745
+ };
3741
3746
  Getter.prototype.Dispose = function () {
3742
3747
  var _a;
3743
3748
  (_a = this.viewPortRemoval) === null || _a === void 0 ? void 0 : _a.call(this);
@@ -3763,13 +3768,18 @@ var BatchedDataGetter;
3763
3768
  return;
3764
3769
  }
3765
3770
  var index = 0;
3766
- this.getterInterval = setInterval(function () {
3771
+ var onTick = function () {
3767
3772
  _this.processBatch(_this.data.slice(index, index + _this.batchSize));
3768
3773
  index += _this.batchSize;
3769
- if (index >= _this.data.length) {
3770
- clearInterval(_this.getterInterval);
3771
- }
3772
- }, GETTER_DELAY);
3774
+ return index >= _this.data.length;
3775
+ };
3776
+ if (!onTick()) {
3777
+ this.getterInterval = setInterval(function () {
3778
+ if (onTick()) {
3779
+ clearInterval(_this.getterInterval);
3780
+ }
3781
+ }, GETTER_DELAY);
3782
+ }
3773
3783
  };
3774
3784
  Getter.prototype.processBatch = function (batch) {
3775
3785
  var _a;