diff --git a/packages/frontend/src/hooks/useZoomSpace.ts b/packages/frontend/src/hooks/useZoomSpace.ts index b3483c8..17faeba 100644 --- a/packages/frontend/src/hooks/useZoomSpace.ts +++ b/packages/frontend/src/hooks/useZoomSpace.ts @@ -46,8 +46,6 @@ export function useZoomSpace({ minScale = 0.5, maxScale = 2.5, }: UseZoomSpaceProps) { - const animationFrameId = useRef(null); - const zoomSpace = (event: KonvaEventObject) => { event.evt.preventDefault(); @@ -80,16 +78,8 @@ export function useZoomSpace({ } const newPosition = calculateNewPosition(pointer, mousePointTo, newScale); - - if (animationFrameId.current) { - cancelAnimationFrame(animationFrameId.current); - } - - animationFrameId.current = requestAnimationFrame(() => { - stage.scale({ x: newScale, y: newScale }); - stage.position(newPosition); - stage.batchDraw(); - }); + stage.scale({ x: newScale, y: newScale }); + stage.position(newPosition); } };