Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(console): fix eslint warnings #6941

Merged
merged 1 commit into from
Jul 24, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading