From 38fafb0e50f6bd1f30c8c6c0c3c4c6409e829393 Mon Sep 17 00:00:00 2001 From: sebastjanartic <45803536-sebastjanartic@users.noreply.replit.com> Date: Thu, 28 Aug 2025 20:28:48 +0000 Subject: [PATCH] Improve video player dragging and add visual feedback for navigation Refine horizontal drag limits and transition animations in the video modal component, enhancing the user experience for navigating between videos. 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/plzfVnD --- client/src/components/bunny-video-modal.tsx | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/client/src/components/bunny-video-modal.tsx b/client/src/components/bunny-video-modal.tsx index 0bca9ee..b392ec1 100644 --- a/client/src/components/bunny-video-modal.tsx +++ b/client/src/components/bunny-video-modal.tsx @@ -95,7 +95,10 @@ export default function BunnyVideoModal({ video, isOpen, onClose, onEdit, videos // Only allow horizontal drag if it's more horizontal than vertical if (deltaY < Math.abs(deltaX)) { - setDragOffset(deltaX); + // Limit drag distance to prevent excessive movement + const maxDrag = 300; + const limitedDelta = Math.max(-maxDrag, Math.min(maxDrag, deltaX)); + setDragOffset(limitedDelta); } }; @@ -336,7 +339,11 @@ export default function BunnyVideoModal({ video, isOpen, onClose, onEdit, videos