Skip to content

Commit

Permalink
chore(console): fix eslint warnings (#6941)
Browse files Browse the repository at this point in the history
  • Loading branch information
skyrpex authored Jul 24, 2024
1 parent 5efb3d3 commit db18b94
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ export const ZoomPane = forwardRef<ZoomPaneRef, ZoomPaneProps>((props, ref) => {
}
});
},
[restrict],
[restrict, setViewTransform],
);
useEvent("wheel", onWheel as (event: Event) => void, containerRef.current, {
// Use passive: false to prevent the default behavior of scrolling the page.
Expand Down Expand Up @@ -286,7 +286,7 @@ export const ZoomPane = forwardRef<ZoomPaneRef, ZoomPaneProps>((props, ref) => {
});
});
},
[isSpacePressed, isDragging, restrict],
[isSpacePressed, isDragging, setViewTransform, restrict],
) as (event: Event) => void,
);

Expand Down Expand Up @@ -316,7 +316,7 @@ export const ZoomPane = forwardRef<ZoomPaneRef, ZoomPaneProps>((props, ref) => {
setViewTransform((viewTransform) => {
return restrict(viewTransform);
});
}, [restrict]);
}, [restrict, setViewTransform]);

const throttledFixViewport = useRafThrottle(fixViewport);

Expand Down Expand Up @@ -358,7 +358,7 @@ export const ZoomPane = forwardRef<ZoomPaneRef, ZoomPaneProps>((props, ref) => {
z: z,
});
});
}, [restrict]);
}, [restrict, setViewTransform]);

const zoomOut = useCallback(() => {
const container = containerRef.current;
Expand All @@ -385,7 +385,7 @@ export const ZoomPane = forwardRef<ZoomPaneRef, ZoomPaneProps>((props, ref) => {
z: z,
});
});
}, [restrict]);
}, [restrict, setViewTransform]);

const zoomToFit = useCallback(
(viewport?: Viewport) => {
Expand Down Expand Up @@ -421,7 +421,7 @@ export const ZoomPane = forwardRef<ZoomPaneRef, ZoomPaneProps>((props, ref) => {
};
});
},
[boundingBox],
[boundingBox?.height, boundingBox?.width, setViewTransform],
);

useImperativeHandle(
Expand Down

0 comments on commit db18b94

Please sign in to comment.