From 271e6257676d8ba2aa853274fe9f52d468b98327 Mon Sep 17 00:00:00 2001 From: Mina Choi Date: Mon, 26 Oct 2026 15:21:24 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=EC=87=BC=EC=B8=A0=20=EB=A7=88=EC=9A=B0?= =?UTF-8?q?=EC=8A=A4=20=EB=81=8C=EA=B8=B0=20=EA=B8=B0=EC=A4=80=EC=9D=84=20?= =?UTF-8?q?=ED=99=94=EB=A9=B4=2015%=EC=97=90=EC=84=9C=2030px=EB=A1=9C=20?= =?UTF-8?q?=E2=80=94=20=EC=A1=B0=EA=B8=88=EB=A7=8C=20=EB=81=8C=EC=96=B4?= =?UTF-8?q?=EB=8F=84=20=EB=84=98=EC=96=B4=EA=B0=80=EA=B2=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/b/Shorts.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/frontend/src/b/Shorts.tsx b/frontend/src/b/Shorts.tsx index b19a855..f040b65 100644 --- a/frontend/src/b/Shorts.tsx +++ b/frontend/src/b/Shorts.tsx @@ -46,6 +46,8 @@ function command(frame: HTMLIFrameElement | null | undefined, func: Func, args: } const PLAYING = 1 +// 마우스로 이만큼 끌면 다음·이전 영상으로 넘긴다 +const SWIPE_PX = 30 /** 화면에 보이는 동안만 true */ function useVisible(threshold = 0.5) { @@ -247,11 +249,11 @@ function ShortsViewer({ items, start, onClose, onAt }: { items: ShortItem[]; sta setDragging(false) if (!d || !box) return if (!d.moved) return togglePause() - // 한 화면의 15% 넘게 끌면 다음·이전 영상으로, 아니면 제자리로 + // 30px 만 끌어도 다음·이전 영상으로, 그보다 덜 끌면 제자리로 const h = box.clientHeight const dy = e.clientY - d.y const base = Math.round(d.top / h) - const target = Math.min(items.length - 1, Math.max(0, base + (dy < -h * 0.15 ? 1 : dy > h * 0.15 ? -1 : 0))) + const target = Math.min(items.length - 1, Math.max(0, base + (dy < -SWIPE_PX ? 1 : dy > SWIPE_PX ? -1 : 0))) box.scrollTo({ top: target * h, behavior: 'smooth' }) }