From fc2cda977a75d3274d795dc27ddc7dc9c3b0e81e Mon Sep 17 00:00:00 2001 From: pipisebastian Date: Sun, 24 Nov 2024 07:32:56 +0900 Subject: [PATCH] =?UTF-8?q?refactor:=20=EC=A3=BC=EC=84=9D=20=EC=A0=9C?= =?UTF-8?q?=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit #178 --- client/src/features/page/hooks/usePage.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/client/src/features/page/hooks/usePage.ts b/client/src/features/page/hooks/usePage.ts index f9cb9a40..088d6831 100644 --- a/client/src/features/page/hooks/usePage.ts +++ b/client/src/features/page/hooks/usePage.ts @@ -99,10 +99,9 @@ export const usePage = ({ x, y }: Position) => { switch (direction) { case "right": { - // startWidth + deltaX 가 계속해서 변하는 값. 사용자가 마우스를 움직이면서 계속해서 변함 newWidth = Math.min( - window.innerWidth - startPosition.x - getSidebarWidth() - PADDING, // 최대 넓이를 지정하고 싶을때 Math.min - Math.max(PAGE.MIN_WIDTH, startWidth + deltaX), //최소 넓이를 지정하고 싶을때 Math.max + window.innerWidth - startPosition.x - getSidebarWidth() - PADDING, + Math.max(PAGE.MIN_WIDTH, startWidth + deltaX), ); break; }