@@ -34,26 +34,6 @@ export function TimelineCursor() {
3434 startHourRef . current = startHour ;
3535 endHourRef . current = endHour ;
3636
37- // Debounce function to limit how often a function can be called
38- const debounce = ( func , delay ) => {
39- let timeoutId ;
40- return function ( ...args ) {
41- if ( timeoutId ) {
42- clearTimeout ( timeoutId ) ;
43- }
44- timeoutId = setTimeout ( ( ) => {
45- func . apply ( this , args ) ;
46- } , delay ) ;
47- } ;
48- } ;
49-
50- // Create debounced version of updateCursorPosition
51- const debouncedUpdateCursorPosition = useRef (
52- debounce ( ( time , startHr , endHr ) => {
53- updateCursorPosition ( time , startHr , endHr ) ;
54- } , 100 )
55- ) . current ;
56-
5737 // Subscribe to timeline state changes
5838 useEffect ( ( ) => {
5939 const unsubscribe = timelineState . subscribe ( state => {
@@ -63,7 +43,7 @@ export function TimelineCursor() {
6343 // Only update current time if not dragging
6444 if ( ! isDraggingRef . current && ! state . userControllingCursor ) {
6545 updateTimeDisplay ( state . currentTime ) ;
66- debouncedUpdateCursorPosition (
46+ updateCursorPosition (
6747 state . currentTime ,
6848 state . timelineStartHour || 0 ,
6949 state . timelineEndHour || getTimelineDayLengthHours ( state . selectedDate )
@@ -72,7 +52,7 @@ export function TimelineCursor() {
7252 } ) ;
7353
7454 return ( ) => unsubscribe ( ) ;
75- } , [ debouncedUpdateCursorPosition ] ) ;
55+ } , [ ] ) ;
7656
7757 // Set up drag handling
7858 useEffect ( ( ) => {
0 commit comments