1
0
mirror of https://github.com/upscayl/upscayl.git synced 2025-01-31 04:03:51 +01:00

Added resetImagePaths

This commit is contained in:
Feenix 2022-12-21 21:13:54 +05:30
parent 5ddc5a8511
commit 6c7ccc9328
2 changed files with 6 additions and 1 deletions

View File

@ -5,11 +5,13 @@ const ImageOptions = ({
setZoomAmount,
leftImageRef,
rightImageRef,
resetImagePaths,
}: {
zoomAmount: string;
setZoomAmount: (arg: any) => void;
leftImageRef: React.RefObject<HTMLImageElement>;
rightImageRef: React.RefObject<HTMLImageElement>;
resetImagePaths: () => void;
}) => {
const [zoomLevel, setZoomLevel] = React.useState("125");
@ -42,7 +44,9 @@ const ImageOptions = ({
<div className="collapse-content bg-base-100 text-base-content">
<div className="flex max-h-96 flex-col justify-center gap-5 overflow-auto p-5">
<button className="btn-primary btn">Reset Image</button>
<button className="btn-primary btn" onClick={resetImagePaths}>
Reset Image
</button>
<div className="flex flex-row items-center gap-2">
<p className="w-20">Zoom:</p>
<button

View File

@ -536,6 +536,7 @@ const Home = () => {
setZoomAmount={setZoomAmount}
leftImageRef={leftImageRef}
rightImageRef={rightImageRef}
resetImagePaths={resetImagePaths}
/>
<ReactCompareSlider
itemOne={