mirror of
https://github.com/upscayl/upscayl.git
synced 2025-01-31 04:03:51 +01:00
Added resetImagePaths
This commit is contained in:
parent
5ddc5a8511
commit
6c7ccc9328
@ -5,11 +5,13 @@ const ImageOptions = ({
|
|||||||
setZoomAmount,
|
setZoomAmount,
|
||||||
leftImageRef,
|
leftImageRef,
|
||||||
rightImageRef,
|
rightImageRef,
|
||||||
|
resetImagePaths,
|
||||||
}: {
|
}: {
|
||||||
zoomAmount: string;
|
zoomAmount: string;
|
||||||
setZoomAmount: (arg: any) => void;
|
setZoomAmount: (arg: any) => void;
|
||||||
leftImageRef: React.RefObject<HTMLImageElement>;
|
leftImageRef: React.RefObject<HTMLImageElement>;
|
||||||
rightImageRef: React.RefObject<HTMLImageElement>;
|
rightImageRef: React.RefObject<HTMLImageElement>;
|
||||||
|
resetImagePaths: () => void;
|
||||||
}) => {
|
}) => {
|
||||||
const [zoomLevel, setZoomLevel] = React.useState("125");
|
const [zoomLevel, setZoomLevel] = React.useState("125");
|
||||||
|
|
||||||
@ -42,7 +44,9 @@ const ImageOptions = ({
|
|||||||
|
|
||||||
<div className="collapse-content bg-base-100 text-base-content">
|
<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">
|
<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">
|
<div className="flex flex-row items-center gap-2">
|
||||||
<p className="w-20">Zoom:</p>
|
<p className="w-20">Zoom:</p>
|
||||||
<button
|
<button
|
||||||
|
@ -536,6 +536,7 @@ const Home = () => {
|
|||||||
setZoomAmount={setZoomAmount}
|
setZoomAmount={setZoomAmount}
|
||||||
leftImageRef={leftImageRef}
|
leftImageRef={leftImageRef}
|
||||||
rightImageRef={rightImageRef}
|
rightImageRef={rightImageRef}
|
||||||
|
resetImagePaths={resetImagePaths}
|
||||||
/>
|
/>
|
||||||
<ReactCompareSlider
|
<ReactCompareSlider
|
||||||
itemOne={
|
itemOne={
|
||||||
|
Loading…
x
Reference in New Issue
Block a user