Skip to content

Commit

Permalink
fix: restore center on feature on time series (#376)
Browse files Browse the repository at this point in the history
  • Loading branch information
claustres committed Sep 4, 2024
1 parent 996c9e3 commit 961856a
Showing 1 changed file with 14 additions and 9 deletions.
23 changes: 14 additions & 9 deletions src/components/TimeSeriesToolbar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@
</template>

<script setup>
import { computed, inject } from 'vue'
import { computed, inject, unref } from 'vue'
import { Store, composables as kCoreComposables } from '@kalisio/kdk/core.client'
import { composables as kMapComposables } from '@kalisio/kdk/map.client'
const { state } = kCoreComposables.useCurrentActivity()
const { state, centerOnSelection, hasProbedLocation, centerOnProbe } = kMapComposables.useCurrentActivity()
// Props
const props = defineProps({
Expand Down Expand Up @@ -55,8 +56,17 @@ const content = computed(() => {
'last-12-hours', 'last-day', 'last-2-days', 'last-3-days', 'last-week',
'next-12-hours', 'next-day', 'next-2-days', 'next-3-days']
}]
}, {
id: 'center-view',
icon: 'las la-eye',
tooltip: 'TimeSeries.CENTER_ON',
visible: 'probedVariables',
handler: () => {
if (hasProbedLocation()) centerOnProbe()
else centerOnSelection()
}
}]
/* TODO: actions previously available on KTimeSeries
/* TODO: action previously available on KTimeSeries
{
id: 'run-options',
component: 'input/KOptionsChooser',
Expand All @@ -66,13 +76,8 @@ const content = computed(() => {
hideSelected: false,
options: ':runOptions',
on: { event: 'option-chosen', listener: 'onUpdateRun' }
}, {
id: 'center-view',
icon: 'las la-eye',
tooltip: 'TimeSeries.CENTER_ON',
visible: 'probedVariables',
handler: 'onCenterOn'
}
*/
})
</script>

0 comments on commit 961856a

Please sign in to comment.