Skip to content

Commit

Permalink
fix: link allowDataSourcesToSuspendAnimation Viewer's property to Wid…
Browse files Browse the repository at this point in the history
…get's property
  • Loading branch information
jfayot committed Sep 25, 2024
1 parent 46494ce commit 59aff4c
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions packages/widgets/Source/Viewer/Viewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -836,7 +836,6 @@ Either specify options.terrainProvider instead or set options.baseLayerPicker to
this._eventHelper = eventHelper;
this._lastWidth = 0;
this._lastHeight = 0;
this._allowDataSourcesToSuspendAnimation = true;
this._enableInfoOrSelection = defined(infoBox) || defined(selectionIndicator);
this._selectedEntity = undefined;
this._selectedEntityChanged = new Event();
Expand Down Expand Up @@ -1384,10 +1383,10 @@ Object.defineProperties(Viewer.prototype, {
*/
allowDataSourcesToSuspendAnimation: {
get: function () {
return this._allowDataSourcesToSuspendAnimation;
return this._cesiumWidget.allowDataSourcesToSuspendAnimation;
},
set: function (value) {
this._allowDataSourcesToSuspendAnimation = value;
this._cesiumWidget.allowDataSourcesToSuspendAnimation = value;
},
},

Expand Down Expand Up @@ -1756,7 +1755,7 @@ Viewer.prototype._onTick = function (clock) {
const time = clock.currentTime;

const isUpdated = this._cesiumWidget.dataSourceDisplay.ready;
if (this._allowDataSourcesToSuspendAnimation) {
if (this.allowDataSourcesToSuspendAnimation) {
this._clockViewModel.canAnimate = isUpdated;
}

Expand Down

0 comments on commit 59aff4c

Please sign in to comment.