Skip to content

Commit

Permalink
fix: time series not updated when changing group by mode
Browse files Browse the repository at this point in the history
  • Loading branch information
claustres committed Sep 4, 2024
1 parent 3ff0a6d commit 3847a94
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/components/GlobeActivity.vue
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,7 @@ export default {
this.onUpdatedLayerEvent = this.generateHandlerForLayerEvent('layer-updated')
this.$engineEvents.on('layer-updated', this.onUpdatedLayerEvent)
this.$engineEvents.on('selected-level-changed', this.updateTimeSeries)
this.$events.on('timeseries-group-by-changed', this.updateTimeSeries)
// Initialize the time range
const span = Store.get('timeseries.span')
const start = moment(Time.getCurrentTime()).subtract(span, 'm')
Expand All @@ -215,6 +216,7 @@ export default {
this.$engineEvents.off('layer-removed', this.onRemovedLayerEvent)
this.$engineEvents.off('layer-updated', this.onUpdatedLayerEvent)
this.$engineEvents.off('selected-level-changed', this.updateTimeSeries)
this.$events.off('timeseries-group-by-changed', this.updateTimeSeries)
},
unmounted () {
utils.sendEmbedEvent('globe-destroyed')
Expand Down
2 changes: 2 additions & 0 deletions src/components/MapActivity.vue
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,7 @@ export default {
this.$engineEvents.on('moveend', this.onMoveEnd)
this.$engineEvents.on('forecast-model-changed', this.updateSelection)
this.$engineEvents.on('selected-level-changed', this.updateSelection)
this.$events.on('timeseries-group-by-changed', this.updateTimeSeries)
// Initialize the time range
const span = Store.get('timeseries.span')
const start = moment(Time.getCurrentTime()).subtract(span, 'm')
Expand All @@ -322,6 +323,7 @@ export default {
this.$engineEvents.off('moveend', this.onMoveEnd)
this.$engineEvents.off('forecast-model-changed', this.updateSelection)
this.$engineEvents.off('selected-level-changed', this.updateSelection)
this.$events.off('timeseries-group-by-changed', this.updateTimeSeries)
this.unregisterStyle('point', this.getHighlightMarker)
this.unregisterStyle('tooltip', this.getHighlightTooltip)
},
Expand Down

0 comments on commit 3847a94

Please sign in to comment.