diff --git a/server/routes/widgets.js b/server/routes/widgets.js index cdc2311..9cd2060 100644 --- a/server/routes/widgets.js +++ b/server/routes/widgets.js @@ -427,29 +427,62 @@ load(); setInterval(load, 600000); } function renderRSS(c) { + // scroll_speed is authored in the UI as "seconds" (legacy field), but that used to be wired + // straight into animation-duration: a *fixed total time* for the whole strip to cross the + // screen. That makes the on-screen speed depend on how much content there is - a feed with + // many items gets dragged through in the same {scroll_speed}s as a feed with one, so it + // flies past far too fast, never lets the reader finish, and simply "jumps back to the + // start" once the fixed duration is up. Instead we treat scroll_speed as calibrating a + // constant px/sec rate (using one viewport-width per scroll_speed seconds as the reference, + // matching prior behaviour for content that fits in one screen), then measure the actual + // rendered width of the ticker and derive a duration long enough to move that full distance + // at the same constant speed - so more items simply take proportionally longer, and every + // item scrolls fully into and out of view before the loop restarts. + const scrollSpeedSec = safeNumber(c.scroll_speed, 30); return `
Loading feed...
`; }