diff options
Diffstat (limited to 'src/views/_sila/Motherboard/Dynamic/MotherboardDynamicPage.vue')
-rw-r--r-- | src/views/_sila/Motherboard/Dynamic/MotherboardDynamicPage.vue | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/src/views/_sila/Motherboard/Dynamic/MotherboardDynamicPage.vue b/src/views/_sila/Motherboard/Dynamic/MotherboardDynamicPage.vue index 15768432..c5562f2b 100644 --- a/src/views/_sila/Motherboard/Dynamic/MotherboardDynamicPage.vue +++ b/src/views/_sila/Motherboard/Dynamic/MotherboardDynamicPage.vue @@ -1,10 +1,7 @@ <template> <b-container fluid="xl"> <page-title :description="$t('appPageTitle.dynamicInformation')" /> - <table-date-picker - :switch-time-scale="switchTimeScale" - :time-scale="timeScale" - /> + <table-date-picker :time-scale="timeScale" @changePeriod="onChangePeriod" /> <motherboard-temp :time-scale="timeScale"></motherboard-temp> </b-container> </template> @@ -29,8 +26,17 @@ export default { }, methods: { - switchTimeScale(period) { + resetZoom() { + const resetButton = document.querySelector('.highcharts-reset-zoom'); + if (!resetButton) { + return; + } + + resetButton.dispatchEvent(new Event('click')); + }, + onChangePeriod(period) { this.timeScale = period; + this.resetZoom(); }, }, }; |