fix zoom
Gitea Actions Demo / build_and_push (push) Successful in 1m14s
Details
Gitea Actions Demo / build_and_push (push) Successful in 1m14s
Details
This commit is contained in:
parent
7142293591
commit
02e96853f3
|
|
@ -2,9 +2,9 @@
|
||||||
|
|
||||||
## Task State
|
## Task State
|
||||||
|
|
||||||
- task_id: TASK-INTEG-SECTION
|
- task_id: TASK-SECTION-DIST-FIX
|
||||||
- status: success
|
- status: success
|
||||||
- summary: **Playwright-интеграционный тест для TASK-SECTION-DURATION-ZOOM: 3 passed. Фиксы 2 багов (setChartRef timing + resetAll programmatic zoom).**
|
- summary: **Добавлена строка «Дистанция» в «Данные участка» + drag-zoom теперь персистится при смене вкладки (selectedRange вместо null в onZoomComplete). 3 passed.**
|
||||||
- next task: —
|
- next task: —
|
||||||
|
|
||||||
## ✅ CODER SUCCESS REPORT — TASK-INTEG-SECTION (+TASK-SECTION-BUGS)
|
## ✅ CODER SUCCESS REPORT — TASK-INTEG-SECTION (+TASK-SECTION-BUGS)
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,19 @@
|
||||||
# Progress — Strava Frontend
|
# Progress — Strava Frontend
|
||||||
|
|
||||||
|
## 2026-09-26 — TASK-SECTION-DIST-FIX: строка «Дистанция» + drag-zoom персистится при смене вкладки
|
||||||
|
|
||||||
|
- `src/pages/workouts/components/WorkoutItem.vue`:
|
||||||
|
- `computeAreaData`: добавлена строка `avgData["Дистанция"]` =
|
||||||
|
`distances[end-1] - distances[start]` (формат: >=1000 → "X.X км",
|
||||||
|
иначе "X м"). Расположена после «Продолжительность», перед циклом
|
||||||
|
по `chartConfigs`.
|
||||||
|
- `onZoomComplete`: `selectedRange.value = null` →
|
||||||
|
`selectedRange.value = { startIdx: start, endIdx: end }` — drag-zoom
|
||||||
|
теперь сохраняет диапазон индексов, и `applySelectedRangeZoom()`
|
||||||
|
(из `setChartRef` на remount) повторно применяет zoom после смены
|
||||||
|
вкладки.
|
||||||
|
- Verified: `yarn build` exit 0; `npx playwright test tests/section-duration.spec.ts` → 3 passed.
|
||||||
|
|
||||||
## 2026-09-26 — TASK-INTEG-SECTION + TASK-SECTION-BUGS: интеграционный тест section-duration + фикс 2 багов
|
## 2026-09-26 — TASK-INTEG-SECTION + TASK-SECTION-BUGS: интеграционный тест section-duration + фикс 2 багов
|
||||||
|
|
||||||
- `../integration/tests/section-duration.spec.ts` (new): 3 Playwright-теста
|
- `../integration/tests/section-duration.spec.ts` (new): 3 Playwright-теста
|
||||||
|
|
|
||||||
|
|
@ -605,6 +605,14 @@ const computeAreaData = (start: number, end: number) => {
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
avgData["Продолжительность"] = secondsToDuration(durSec);
|
avgData["Продолжительность"] = secondsToDuration(durSec);
|
||||||
|
const distMeters = Math.max(
|
||||||
|
0,
|
||||||
|
Math.round(Number(distances[end - 1]) - Number(distances[start])),
|
||||||
|
);
|
||||||
|
avgData["Дистанция"] =
|
||||||
|
distMeters >= 1000
|
||||||
|
? (distMeters / 1000).toFixed(1) + " км"
|
||||||
|
: distMeters + " м";
|
||||||
for (const config of chartConfigs.value) {
|
for (const config of chartConfigs.value) {
|
||||||
const values = config.data.datasets[0].data.slice(start, end);
|
const values = config.data.datasets[0].data.slice(start, end);
|
||||||
const present = values.filter((v) => v !== null);
|
const present = values.filter((v) => v !== null);
|
||||||
|
|
@ -918,8 +926,8 @@ const buildChartOptions = (
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// A manual zoom ends any earlier section selection.
|
// Store the zoomed range so it persists across tab switches.
|
||||||
selectedRange.value = null;
|
selectedRange.value = { startIdx: start, endIdx: end };
|
||||||
computeAreaData(start, end);
|
computeAreaData(start, end);
|
||||||
group.broadcastZoom(min, max);
|
group.broadcastZoom(min, max);
|
||||||
},
|
},
|
||||||
|
|
@ -1120,7 +1128,6 @@ const chartConfigs = computed<Array<ChartConfig>>(() => {
|
||||||
"linearAxis",
|
"linearAxis",
|
||||||
yScaleById.linearAxis.options,
|
yScaleById.linearAxis.options,
|
||||||
);
|
);
|
||||||
push("power", "Мощность", data.power, "logAxis", yScaleById.logAxis.options);
|
|
||||||
push(
|
push(
|
||||||
"elevation",
|
"elevation",
|
||||||
"Подъем",
|
"Подъем",
|
||||||
|
|
@ -1128,6 +1135,7 @@ const chartConfigs = computed<Array<ChartConfig>>(() => {
|
||||||
"yGroung",
|
"yGroung",
|
||||||
yScaleById.yGroung.options,
|
yScaleById.yGroung.options,
|
||||||
);
|
);
|
||||||
|
push("power", "Мощность", data.power, "logAxis", yScaleById.logAxis.options);
|
||||||
return configs;
|
return configs;
|
||||||
});
|
});
|
||||||
const collectCharts = () => {
|
const collectCharts = () => {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue