diff --git a/admin-dashboard.html b/admin-dashboard.html
index 8dcf848..8af83db 100644
--- a/admin-dashboard.html
+++ b/admin-dashboard.html
@@ -707,6 +707,8 @@
+
+
@@ -1639,9 +1641,8 @@ function setupDraggableImage() {
newDraggable.classList.remove('dragging');
console.log('Finished dragging at', originalX, originalY);
- // Force a save of the current position
- document.getElementById('imagePositionX').value = currentImageX;
- document.getElementById('imagePositionY').value = currentImageY;
+ // Update preview with new position
+ updateBannerPreview();
}
}
@@ -1658,6 +1659,10 @@ document.addEventListener('DOMContentLoaded', () => {
if (position !== 'custom') {
currentImageX = '0';
currentImageY = '0';
+
+ // Update hidden input fields
+ document.getElementById('imagePositionX').value = currentImageX;
+ document.getElementById('imagePositionY').value = currentImageY;
}
// Update active button styling