Skip to content

Commit

Permalink
Update the defaultTimeVarying, too, on sync.
Browse files Browse the repository at this point in the history
  • Loading branch information
kring committed Dec 11, 2019
1 parent 9515557 commit ddeb0b5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
5 changes: 5 additions & 0 deletions lib/Models/TimelineStack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,11 @@ export default class TimelineStack {
layer.setTrait(stratumId, "currentTime", currentTime);
layer.setTrait(stratumId, "isPaused", isPaused);
}

if (this.defaultTimeVarying) {
this.defaultTimeVarying.setTrait(stratumId, "currentTime", currentTime);
this.defaultTimeVarying.setTrait(stratumId, "isPaused", isPaused);
}
}
}

Expand Down
5 changes: 4 additions & 1 deletion lib/ReactViews/BottomDock/Timeline/Timeline.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,10 @@ const Timeline = observer(
render() {
const terria = this.props.terria;
const catalogItem = terria.timelineStack.top;
if (!defined(catalogItem) || !defined(catalogItem.currentTimeAsJulianDate)) {
if (
!defined(catalogItem) ||
!defined(catalogItem.currentTimeAsJulianDate)
) {
return null;
}

Expand Down

0 comments on commit ddeb0b5

Please sign in to comment.