Progressing on profile edition and thumbnail cropping

This commit is contained in:
2024-09-11 17:47:04 +02:00
parent e904f28b3b
commit 6856d3b9af
25 changed files with 278 additions and 88 deletions

View File

@@ -15,13 +15,6 @@ const reset = (_: MouseEvent) => {
dispX.value = 0;
dispY.value = 0;
}
function clamp(x: number, min: number, max: number): number {
if (x > max)
return max;
if (x < min)
return min;
return x;
}
function edgePos(side: 'bottom' | 'top' | 'left' | 'right', pos: { x: number, y: number }, offset: number): { x: number, y: number } {
switch (side) {
case "left":