Improve focal point editor to precisely set image focus for various aspect ratios

Refactor the `FocalPointEditor` component in `admin-gallery.tsx` to accurately map click coordinates on aspect ratio previews to the original image's focal point. This involves recalculating the mapping logic to account for image scaling and cropping (`object-fit: cover`). Additionally, new focal point data has been added to `server/gallery-focal-points.json`, and some image mappings in `server/cloudinary-gallery-map.json` have been adjusted.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 23852c00-4779-460a-9e0c-d09fee4b6c92
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Event-Id: 2f918981-5322-41bc-8a92-d34c6986c129
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/f209e72a-0939-48fa-84fc-57854de71967/23852c00-4779-460a-9e0c-d09fee4b6c92/ncMMRQ9
Replit-Helium-Checkpoint-Created: true
This commit is contained in:
sebastjanartic
2026-03-06 11:18:24 +00:00
parent 81ba418cc7
commit 19953b3b84
3 changed files with 53 additions and 8 deletions
+28
View File
@@ -50,5 +50,33 @@
"DSC08350.jpg": {
"x": 51,
"y": 33
},
"Berny Blank 1.jpg": {
"x": 44,
"y": 31
},
"Christa Fartek und Robert F 1 .jpg": {
"x": 49,
"y": 27
},
"Die 3 K rntner 1.jpg": {
"x": 28,
"y": 36
},
"Die Zwirn 2.jpg": {
"x": 50,
"y": 29
},
"DSC07177.jpg": {
"x": 0,
"y": 0
},
"DSC07217.jpg": {
"x": 52,
"y": 0
},
"Adriana 1.jpg": {
"x": 100,
"y": 23
}
}