mirror of
https://github.com/Dvorinka/PPve.git
synced 2026-06-04 12:32:59 +00:00
d
This commit is contained in:
@@ -707,6 +707,8 @@
|
|||||||
|
|
||||||
<!-- Hidden fields for image position data -->
|
<!-- Hidden fields for image position data -->
|
||||||
<input type="hidden" id="imagePosition" name="style[imagePosition]" value="center">
|
<input type="hidden" id="imagePosition" name="style[imagePosition]" value="center">
|
||||||
|
<input type="hidden" id="imagePositionX" name="style[imageX]" value="0">
|
||||||
|
<input type="hidden" id="imagePositionY" name="style[imageY]" value="0">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="imagePreviewContainer" style="display: none; margin-top: 15px; text-align: center;">
|
<div id="imagePreviewContainer" style="display: none; margin-top: 15px; text-align: center;">
|
||||||
@@ -1639,9 +1641,8 @@ function setupDraggableImage() {
|
|||||||
newDraggable.classList.remove('dragging');
|
newDraggable.classList.remove('dragging');
|
||||||
console.log('Finished dragging at', originalX, originalY);
|
console.log('Finished dragging at', originalX, originalY);
|
||||||
|
|
||||||
// Force a save of the current position
|
// Update preview with new position
|
||||||
document.getElementById('imagePositionX').value = currentImageX;
|
updateBannerPreview();
|
||||||
document.getElementById('imagePositionY').value = currentImageY;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1658,6 +1659,10 @@ document.addEventListener('DOMContentLoaded', () => {
|
|||||||
if (position !== 'custom') {
|
if (position !== 'custom') {
|
||||||
currentImageX = '0';
|
currentImageX = '0';
|
||||||
currentImageY = '0';
|
currentImageY = '0';
|
||||||
|
|
||||||
|
// Update hidden input fields
|
||||||
|
document.getElementById('imagePositionX').value = currentImageX;
|
||||||
|
document.getElementById('imagePositionY').value = currentImageY;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update active button styling
|
// Update active button styling
|
||||||
|
|||||||
Reference in New Issue
Block a user