From 283c876aff2c1a5477955140df783a70ab76dbd8 Mon Sep 17 00:00:00 2001 From: Martin Kagamino Lehoux Date: Sun, 16 Aug 2026 15:03:54 +0200 Subject: feat(web): improve official climb profile --- web/frontend/official-climb-profile-logic.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'web/frontend/official-climb-profile-logic.ts') diff --git a/web/frontend/official-climb-profile-logic.ts b/web/frontend/official-climb-profile-logic.ts index 1b2bc83..893588d 100644 --- a/web/frontend/official-climb-profile-logic.ts +++ b/web/frontend/official-climb-profile-logic.ts @@ -14,12 +14,11 @@ const profileStepSizesM: number[] = [100, 200, 500, 1000]; const displayStepForLength = (lengthM: number): number => profileStepSizesM.find((stepM) => Math.ceil(lengthM / stepM) <= 30) || profileStepSizesM[profileStepSizesM.length - 1]; const profileBandForSlope = (slopePercent: number): ProfileBand => { - if (slopePercent < 0) return "downhill"; + if (slopePercent <= 0) return "downhill"; if (slopePercent < 3) return "0-3"; if (slopePercent < 6) return "3-6"; if (slopePercent < 9) return "6-9"; - if (slopePercent < 12) return "9-12"; - return "12-plus"; + return "9-plus"; }; const officialProfileSections = (points: ProfilePoint[], startIndex: number, endIndex: number, stepM: number): OfficialProfileSection[] => { const startDistanceM = points[startIndex].distanceKm * 1000; -- cgit v1.2.3