calculate cropping boxes for the image

This commit is contained in:
2026-06-30 14:16:32 -04:00
parent 1426164dc4
commit d2b0955303
3 changed files with 80 additions and 2 deletions
+10 -1
View File
@@ -103,6 +103,7 @@
class="noselect"
draggable="false"
/>
<div id="image_dark_overlay" draggable="false"></div>
</div>
<div id="grab-area" draggable="false">
<div id="box-scale-holder">
@@ -127,7 +128,9 @@
class="resize_anchor"
></div>
</div>
<div id="resize_photo_box" draggable="false"></div>
<div id="resize_photo_box" draggable="false">
<div id="circle-display"></div>
</div>
</div>
<button id="confirm_change" draggable="false">Confirm Change</button>
</div>
@@ -261,6 +264,12 @@
new_profile_image.style.setProperty("--x-size", image_width + "px");
new_profile_image.style.setProperty("--y-size", image_height + "px");
image_dark_overlay.style.setProperty("--x-size", image_width + "px");
image_dark_overlay.style.setProperty("--y-size", image_height + "px");
image_dark_overlay.style.setProperty("--x-offset", "0px");
image_dark_overlay.style.setProperty("--y-offset", "0px");
resize_photo_box.style.setProperty("--size", "350px");
});