From b06db2e77839f7ee460ded236ff9fe283e90699d Mon Sep 17 00:00:00 2001 From: amhsirak Date: Mon, 6 Jan 2025 02:01:20 +0530 Subject: [PATCH] chore: lint --- src/components/atoms/canvas.tsx | 58 ++++++++++++++++----------------- 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/src/components/atoms/canvas.tsx b/src/components/atoms/canvas.tsx index e7cd8597..d198adb0 100644 --- a/src/components/atoms/canvas.tsx +++ b/src/components/atoms/canvas.tsx @@ -26,7 +26,7 @@ class RAFScheduler { this.frameId = requestAnimationFrame(() => { const callbacks = Array.from(this.queue); this.queue.clear(); - + callbacks.forEach(callback => { try { callback(); @@ -37,7 +37,7 @@ class RAFScheduler { this.isProcessing = false; this.frameId = null; - + if (this.queue.size > 0) { this.process(); } @@ -87,12 +87,12 @@ class EventDebouncer { if (this.lowPriorityQueue.length > 0) { const callback = this.lowPriorityQueue.shift(); callback?.(); - + if (this.lowPriorityQueue.length > 0) { this.process(); } } - + this.processing = false; }); } @@ -282,7 +282,7 @@ const Canvas = React.memo(({ width, height, onCreateRef }: CanvasProps) => { canvas.removeEventListener('wheel', handleMouseEvent); canvas.removeEventListener('keydown', handleKeyboardEvent); canvas.removeEventListener('keyup', handleKeyboardEvent); - + scheduler.current.clear(); debouncer.current.clear(); measurementCache.current.clear(); @@ -329,30 +329,30 @@ const Canvas = React.memo(({ width, height, onCreateRef }: CanvasProps) => { className="block" /> - {state.datePickerInfo && ( - dispatch({ - type: 'BATCH_UPDATE', - payload: { datePickerInfo: null } - })} - /> - )} - {state.timePickerInfo && ( - dispatch({ type: 'SET_TIME_PICKER', payload: null })} - /> - )} - {state.dateTimeLocalInfo && ( - dispatch({ type: 'SET_DATETIME_PICKER', payload: null })} - /> - )} + {state.datePickerInfo && ( + dispatch({ + type: 'BATCH_UPDATE', + payload: { datePickerInfo: null } + })} + /> + )} + {state.timePickerInfo && ( + dispatch({ type: 'SET_TIME_PICKER', payload: null })} + /> + )} + {state.dateTimeLocalInfo && ( + dispatch({ type: 'SET_DATETIME_PICKER', payload: null })} + /> + )} );