diff --git a/frontend/src/features/lightbox/components/Lightbox.scss b/frontend/src/features/lightbox/components/Lightbox.scss index f746828729..634d50fd39 100644 --- a/frontend/src/features/lightbox/components/Lightbox.scss +++ b/frontend/src/features/lightbox/components/Lightbox.scss @@ -46,11 +46,9 @@ .lightbox-preview-wrapper { overflow: hidden; - background-color: red; background-color: var(--background-color-secondary); display: grid; grid-template-columns: auto max-content; - place-items: center; width: 100vw; height: 100vh; diff --git a/frontend/src/features/lightbox/components/ReactPanZoom.tsx b/frontend/src/features/lightbox/components/ReactPanZoom.tsx index bd66fdf555..9369087fbb 100644 --- a/frontend/src/features/lightbox/components/ReactPanZoom.tsx +++ b/frontend/src/features/lightbox/components/ReactPanZoom.tsx @@ -47,89 +47,79 @@ export default function ReactPanZoom({ }; return ( - <> - - {({ zoomIn, zoomOut, resetTransform }) => ( - <> -
- } - aria-label="Zoom In" - tooltip="Zoom In" - onClick={() => zoomIn()} - fontSize={20} - /> + + {({ zoomIn, zoomOut, resetTransform, centerView }) => ( + <> +
+ } + aria-label="Zoom In" + tooltip="Zoom In" + onClick={() => zoomIn()} + fontSize={20} + /> - } - aria-label="Zoom Out" - tooltip="Zoom Out" - onClick={() => zoomOut()} - fontSize={20} - /> + } + aria-label="Zoom Out" + tooltip="Zoom Out" + onClick={() => zoomOut()} + fontSize={20} + /> - } - aria-label="Rotate Left" - tooltip="Rotate Left" - onClick={rotateLeft} - fontSize={20} - /> + } + aria-label="Rotate Left" + tooltip="Rotate Left" + onClick={rotateLeft} + fontSize={20} + /> - } - aria-label="Rotate Right" - tooltip="Rotate Right" - onClick={rotateRight} - fontSize={20} - /> + } + aria-label="Rotate Right" + tooltip="Rotate Right" + onClick={rotateRight} + fontSize={20} + /> - } - aria-label="Flip Image" - tooltip="Flip Image" - onClick={flipImage} - fontSize={20} - /> + } + aria-label="Flip Image" + tooltip="Flip Image" + onClick={flipImage} + fontSize={20} + /> - } - aria-label="Reset" - tooltip="Reset" - onClick={() => { - resetTransform(); - setRotation(0); - setFlip(false); - }} - fontSize={20} - /> -
+ } + aria-label="Reset" + tooltip="Reset" + onClick={() => { + resetTransform(); + setRotation(0); + setFlip(false); + }} + fontSize={20} + /> +
- -
- {alt} -
-
- - )} -
- + + {alt} + + + )} + ); }