Skip to content

Commit

Permalink
fix: 캘린더 바를 드래그할 때 아주 잠깐 잘못된 좌표로 이동하며 버벅거리는 문제 해결
Browse files Browse the repository at this point in the history
- 이전 캘린더 바의 이동에서 남아있는 상대좌표의 값이 이후의 캘린더 바의 이동에 영향을 끼친 것. 이동 완료 후 상대좌표의 값을 0으로 초기화시키는 것으로 해결
  • Loading branch information
wzrabbit committed Nov 13, 2023
1 parent 15c1b7a commit fdf5c1d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions frontend/src/hooks/schedule/useCalendarDragScreen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,12 @@ export const useCalendarDragScreen = (props: UseCalendarDragScreenProps) => {
const shouldUpdate = schedule.startDateTime !== startDateTime;

onMouseUp(title, startDateTime, endDateTime, shouldUpdate);

setCalendarPointInfos((prev) => ({
...prev,
relativeX: 0,
relativeY: 0,
}));
}, [onMouseUp, schedule, scheduleBarsInfo, visible]);

useEffect(() => {
Expand Down

0 comments on commit fdf5c1d

Please sign in to comment.