@@ -82,6 +82,12 @@ const RetrospectFocusContent = ({
8282 window . addEventListener ( "touchend" , handleEnd ) ;
8383 } ;
8484
85+ // 슬라이더 위치 계산 - 0일 때 왼쪽 끝에 정확히 위치하도록 조정
86+ const sliderPosition =
87+ retrospectContent . concentration === 0
88+ ? "-8px"
89+ : `calc(${ ( retrospectContent . concentration / 5 ) * 100 } % - ${ BAR . SLIDER_RADIUS } px)` ;
90+
8591 return (
8692 < div className = "w-full mx-2 mt-1" >
8793 < div
@@ -98,8 +104,8 @@ const RetrospectFocusContent = ({
98104 className = "absolute rounded-full bg-line-tertiary"
99105 style = { {
100106 height : `${ BAR . HEIGHT } px` ,
101- width : `calc(100% + ${ BAR . SLIDER_RADIUS * 2 } px)` , // 16px 양쪽 추가
102- left : `-${ BAR . SLIDER_RADIUS } px` , // 왼쪽으로 16px 이동
107+ width : `calc(100% + ${ BAR . SLIDER_RADIUS * 2 } px)` ,
108+ left : `-${ BAR . SLIDER_RADIUS } px` ,
103109 } }
104110 />
105111
@@ -132,11 +138,11 @@ const RetrospectFocusContent = ({
132138
133139 { /* 슬라이더 핸들 */ }
134140 < div
135- className = "absolute m-3 z-30 rounded-full border-2 border-white bg-white shadow"
141+ className = "absolute z-30 rounded-full border-2 border-white bg-white shadow"
136142 style = { {
137- width : `${ BAR . SLIDER_RADIUS * 2 } px` ,
138- height : `${ BAR . SLIDER_RADIUS * 2 } px` ,
139- left : `calc( ${ ( retrospectContent . concentration / 5 ) * 100 } % - ${ BAR . SLIDER_RADIUS * 2 } px)` ,
143+ width : `${ BAR . SLIDER_RADIUS * 2 - 2 } px` ,
144+ height : `${ BAR . SLIDER_RADIUS * 2 - 2 } px` ,
145+ left : sliderPosition ,
140146 transition : "left 0.2s ease" ,
141147 } }
142148 />
0 commit comments