diff --git a/src/pages/workouts/components/WorkoutItem.vue b/src/pages/workouts/components/WorkoutItem.vue index 69afbe9..b396029 100644 --- a/src/pages/workouts/components/WorkoutItem.vue +++ b/src/pages/workouts/components/WorkoutItem.vue @@ -434,7 +434,12 @@ const getUnit = (label: string) => { }; /** Computes "Данные участка" over every metric for the given point range. */ const computeAreaData = (start: number, end: number) => { - markedCoordinats.value = lineCoordinates.slice(start, end); + // The purple line on the map is shown only for a real sub-range; + // a full-range zoom keeps "Данные участка" but highlights nothing. + markedCoordinats.value = + start > 0 || end < lineCoordinates.length + ? lineCoordinates.slice(start, end) + : []; let avgData: AvgData = {}; for (const config of chartConfigs.value) { const values = config.data.datasets[0].data.slice(start, end); @@ -832,6 +837,7 @@ const buildChartOptions = ( activeSection.value = null; group.resetAll(); areaAvgData.value = {}; + markedCoordinats.value = []; return; } activeSection.value = sectionNo; @@ -1064,6 +1070,7 @@ const resetChartZoom = () => { group.resetAll(); activeSection.value = null; areaAvgData.value = {}; + markedCoordinats.value = []; };