Remove F shortcut for photo zooming

This commit is contained in:
Sam Becker 2025-04-25 20:11:23 -05:00
parent 63e843e2d6
commit 4d5d57b6ba
2 changed files with 0 additions and 9 deletions

View File

@ -19,7 +19,6 @@ export default function ZoomControls({
selectImageElement?: selectImageElement?:
(container: HTMLElement | null) => HTMLImageElement | null (container: HTMLElement | null) => HTMLImageElement | null
isEnabled?: boolean isEnabled?: boolean
shouldZoomOnFKeydown?: boolean
}) { }) {
const refImageContainer = useRef<HTMLDivElement>(null); const refImageContainer = useRef<HTMLDivElement>(null);

View File

@ -1,6 +1,5 @@
import useMetaThemeColor from '@/utility/useMetaThemeColor'; import useMetaThemeColor from '@/utility/useMetaThemeColor';
import { useAppState } from '@/state/AppState'; import { useAppState } from '@/state/AppState';
import useKeydownHandler from '@/utility/useKeydownHandler';
import { import {
ComponentProps, ComponentProps,
RefObject, RefObject,
@ -16,7 +15,6 @@ export default function useImageZoomControls({
refImageContainer, refImageContainer,
selectImageElement, selectImageElement,
isEnabled, isEnabled,
shouldZoomOnFKeydown,
} : { } : {
refImageContainer: RefObject<HTMLElement | null> refImageContainer: RefObject<HTMLElement | null>
} & Omit<ComponentProps<typeof ZoomControls>, 'ref' | 'children'>) { } & Omit<ComponentProps<typeof ZoomControls>, 'ref' | 'children'>) {
@ -46,12 +44,6 @@ export default function useImageZoomControls({
viewerRef.current?.reset(); viewerRef.current?.reset();
}, []); }, []);
// On 'F' keydown, toggle fullscreen
const onKeyDown = useCallback(() => {
if (shouldZoomOnFKeydown) { open(); }
}, [shouldZoomOnFKeydown, open]);
useKeydownHandler({ onKeyDown, keys: ['F'] });
useEffect(() => { useEffect(() => {
if (isEnabled) { if (isEnabled) {
const imageRef = ( const imageRef = (