mirror of
https://github.com/upscayl/upscayl.git
synced 2024-11-28 01:10:52 +01:00
Fix lens
This commit is contained in:
parent
0b29789543
commit
4590a202c5
@ -696,7 +696,7 @@ const Home = () => {
|
|||||||
upscaledImagePath &&
|
upscaledImagePath &&
|
||||||
imagePath && (
|
imagePath && (
|
||||||
<div
|
<div
|
||||||
className="img-with-border group relative h-full w-full overflow-hidden"
|
className="group relative h-full w-full overflow-hidden"
|
||||||
onMouseMove={handleMouseMoveCompare}
|
onMouseMove={handleMouseMoveCompare}
|
||||||
>
|
>
|
||||||
<img
|
<img
|
||||||
@ -715,7 +715,8 @@ const Home = () => {
|
|||||||
}]`}
|
}]`}
|
||||||
style={{
|
style={{
|
||||||
clipPath: `circle(${
|
clipPath: `circle(${
|
||||||
lensSize / (parseInt(zoomAmount) / 100)
|
(lensSize + 2 * (parseInt(zoomAmount) / 100)) /
|
||||||
|
(parseInt(zoomAmount) / 100)
|
||||||
}px at ${cursorPosition.x}px ${cursorPosition.y}px)`,
|
}px at ${cursorPosition.x}px ${cursorPosition.y}px)`,
|
||||||
backgroundPosition: "0% 0%",
|
backgroundPosition: "0% 0%",
|
||||||
transformOrigin: backgroundPosition,
|
transformOrigin: backgroundPosition,
|
||||||
@ -728,7 +729,7 @@ const Home = () => {
|
|||||||
src={"file:///" + upscaledImagePath}
|
src={"file:///" + upscaledImagePath}
|
||||||
style={{
|
style={{
|
||||||
clipPath: `circle(${
|
clipPath: `circle(${
|
||||||
(lensSize - parseInt(zoomAmount) / 100) /
|
(lensSize + parseInt(zoomAmount) / 100) /
|
||||||
(parseInt(zoomAmount) / 100)
|
(parseInt(zoomAmount) / 100)
|
||||||
}px at ${cursorPosition.x}px ${cursorPosition.y}px)`,
|
}px at ${cursorPosition.x}px ${cursorPosition.y}px)`,
|
||||||
backgroundPosition: backgroundPosition,
|
backgroundPosition: backgroundPosition,
|
||||||
|
Loading…
Reference in New Issue
Block a user