From 4c7703ff8f136b44db21e5e81061a79c959c2bd0 Mon Sep 17 00:00:00 2001 From: Miguel Angel Simon Sierra Date: Sun, 26 Jul 2026 02:16:28 +0200 Subject: [PATCH] refactor(studio): drop the duplicated row-top docblock The getTimelineRowTop docblock had a second copy sitting on TimelineTrackHeightClip, where it describes nothing. Only the one on the function stays. --- .../studio/src/player/components/timelineLayout.ts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/studio/src/player/components/timelineLayout.ts b/packages/studio/src/player/components/timelineLayout.ts index 615df7d67..2677bf3a4 100644 --- a/packages/studio/src/player/components/timelineLayout.ts +++ b/packages/studio/src/player/components/timelineLayout.ts @@ -38,13 +38,6 @@ export const TRACKS_BOTTOM_PAD = Math.round(TRACK_H * 1.5); */ export const TRACKS_LEFT_PAD = 48; -/** - * The y (content-space) of the top edge of track ROW index `row` (0 = first - * displayed lane). The single source of truth for row→y — the ruler height plus - * the top breathing pad plus whole track lanes above it. Every clip/ghost/ - * placeholder/insertion top and every pointer-y→row inversion goes through this - * (or its inverse in {@link getTimelineRowFromY}) so the pad can never drift. - */ interface TimelineTrackHeightClip { clipId: string; laneCount: number; @@ -105,6 +98,13 @@ function getTimelineRowOffset(row: number, rowHeights: readonly number[]): numbe return (offsets[wholeRow] ?? 0) + fraction * getTimelineRowHeight(wholeRow, rowHeights); } +/** + * The y (content-space) of the top edge of track ROW index `row` (0 = first + * displayed lane). The single source of truth for row→y — the ruler height plus + * the top breathing pad plus whole track lanes above it. Every clip/ghost/ + * placeholder/insertion top and every pointer-y→row inversion goes through this + * (or its inverse in {@link getTimelineRowFromY}) so the pad can never drift. + */ export function getTimelineRowTop(row: number, rowHeights: readonly number[] = []): number { return RULER_H + TRACKS_TOP_PAD + getTimelineRowOffset(row, rowHeights); }