grab picture when moving it around

This commit is contained in:
2026-06-14 07:58:29 -04:00
parent ff5d9724d6
commit 65ed53c5d1
2 changed files with 16 additions and 1 deletions
+5 -1
View File
@@ -10,6 +10,7 @@
<link rel="stylesheet" href="static/error/error.css" /> <link rel="stylesheet" href="static/error/error.css" />
<link rel="stylesheet" href="static/profile_page.css" /> <link rel="stylesheet" href="static/profile_page.css" />
<link rel="stylesheet" href="static/progress_bar.css" /> <link rel="stylesheet" href="static/progress_bar.css" />
<link rel="stylesheet" href="static/cursor.css" />
<div id="popup_background" class="blocked hidden"></div> <div id="popup_background" class="blocked hidden"></div>
@@ -189,6 +190,8 @@
}); });
</script> </script>
<script src="/static/javascript/cursor.js" type="text/javascript"></script>
<script type="text/javascript"> <script type="text/javascript">
var currentPreviewURL = null, var currentPreviewURL = null,
image = null, image = null,
@@ -297,6 +300,7 @@
x_start = currentX; x_start = currentX;
y_start = currentY; y_start = currentY;
mouseClicked = true; mouseClicked = true;
set_cursor_state(CURSOR_GRABBING);
}); });
resize_photo_box.addEventListener("mouseup", () => { resize_photo_box.addEventListener("mouseup", () => {
@@ -308,11 +312,11 @@
document.body.addEventListener("mouseup", () => { document.body.addEventListener("mouseup", () => {
mouseClicked = false; mouseClicked = false;
set_cursor_state(CURSOR_NORMAL);
}); });
</script> </script>
<script src="/static/error/error.js" type="text/javascript"></script> <script src="/static/error/error.js" type="text/javascript"></script>
<script src="/static/javascript/cursor.js" type="text/javascript"></script>
<script <script
src="/static/javascript/password_strength.js" src="/static/javascript/password_strength.js"
type="text/javascript" type="text/javascript"
+11
View File
@@ -189,6 +189,17 @@
z-index: 4; z-index: 4;
} }
#resize_photo_box:hover {
background-color: rgba(0, 0, 0, 0);
width: 350px;
aspect-ratio: 1 / 1;
border-style: dashed;
border-color: black;
border-width: 5px;
z-index: 4;
}
/* /*
#resize_photo_box:hover { #resize_photo_box:hover {