From c3ec76860a1528856939b8cbd99f0bd699260bd2 Mon Sep 17 00:00:00 2001 From: sebastjanartic <45803536-sebastjanartic@users.noreply.replit.com> Date: Fri, 29 Aug 2025 17:23:16 +0000 Subject: [PATCH] Improve carousel scrolling smoothness and speed Adjust carousel auto-scroll interval and speed values in `simple-carousel.tsx` to provide a smoother visual experience. Replit-Commit-Author: Agent Replit-Commit-Session-Id: 2eb1084e-b728-4449-9231-f1665924c8d5 Replit-Commit-Checkpoint-Type: full_checkpoint Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/8cc42625-c1f5-4e43-99bd-77f2c4dedee2/2eb1084e-b728-4449-9231-f1665924c8d5/yexZbDm --- client/src/components/simple-carousel.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/client/src/components/simple-carousel.tsx b/client/src/components/simple-carousel.tsx index e88c3fa..bdbe916 100644 --- a/client/src/components/simple-carousel.tsx +++ b/client/src/components/simple-carousel.tsx @@ -32,13 +32,13 @@ export default function SimpleCarousel({ category, onVideoClick }: SimpleCarouse scrollIntervalRef.current = setInterval(() => { if (!scrollContainerRef.current) return; - const currentSpeed = newSpeed === 'fast' ? 3 : 1.5; + const currentSpeed = newSpeed === 'fast' ? 1.2 : 0.6; const scrollAmount = direction === 'right' ? currentSpeed : -currentSpeed; scrollContainerRef.current.scrollBy({ left: scrollAmount, behavior: 'auto' }); - }, 16); + }, 8); } else { // If not scrolling or different direction, start scrolling startAutoScroll(direction); @@ -57,13 +57,13 @@ export default function SimpleCarousel({ category, onVideoClick }: SimpleCarouse scrollIntervalRef.current = setInterval(() => { if (!scrollContainerRef.current) return; - const currentSpeed = speed === 'fast' ? 3 : 1.5; + const currentSpeed = speed === 'fast' ? 1.2 : 0.6; const scrollAmount = direction === 'right' ? currentSpeed : -currentSpeed; scrollContainerRef.current.scrollBy({ left: scrollAmount, behavior: 'auto' }); - }, 16); + }, 8); }; const stopAutoScroll = () => {