From df7c9b5130ba193fc918a947a461f2a70dc2dd3c Mon Sep 17 00:00:00 2001 From: Martin Kagamino Lehoux Date: Sun, 16 Aug 2026 14:55:26 +0200 Subject: fix(web): use Cotacol for climb difficulty --- web/frontend/ride-detail-canvas.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'web/frontend/ride-detail-canvas.ts') diff --git a/web/frontend/ride-detail-canvas.ts b/web/frontend/ride-detail-canvas.ts index 1453013..c61afee 100644 --- a/web/frontend/ride-detail-canvas.ts +++ b/web/frontend/ride-detail-canvas.ts @@ -1,4 +1,4 @@ -import { clamp, climbMetrics, formatDistance, formatElevation, nearestPointIndex } from "./ride-detail-logic.js"; +import { clamp, climbMetrics, formatClimbLabel, formatDistance, formatElevation, nearestPointIndex } from "./ride-detail-logic.js"; import type { BoundarySource, ClimbBounds, RideDetailColors, RideProfile, RideProfilePoint } from "./types.js"; interface Plot { @@ -137,7 +137,7 @@ export class RideProfileCanvas { const endX = clamp(this.xForDistance(metrics.end.distanceKm), plot.left, plot.right); this.context.fillStyle = climbIndex === this.focusedClimbIndex ? this.colors.climbFocusFill : this.colors.accentFill; this.context.fillRect(startX, plot.top, Math.max(endX - startX, 1), plot.bottom - plot.top); - const label = climb.name || `${metrics.category} ${Math.round(metrics.score)}`; + const label = formatClimbLabel(climb.name, metrics.category, metrics.cotacol); this.context.fillStyle = this.colors.climbLabel; this.context.textAlign = "center"; this.context.textBaseline = "top"; -- cgit v1.2.3