diff --git a/public/scripts/RossAscends-mods.js b/public/scripts/RossAscends-mods.js index 97d86b500..681b63cd3 100644 --- a/public/scripts/RossAscends-mods.js +++ b/public/scripts/RossAscends-mods.js @@ -452,6 +452,7 @@ export function dragElement(elmnt) { var elmntName = elmnt.attr('id'); console.log(`dragElement called for ${elmntName}`); const elmntNameEscaped = $.escapeSelector(elmntName); + console.log(`dragElement escaped name: ${elmntNameEscaped}`); const elmntHeader = $(`#${elmntNameEscaped}header`); if (elmntHeader.length) { diff --git a/public/scripts/extensions/gallery/index.js b/public/scripts/extensions/gallery/index.js index 8281ad538..3dcc32677 100644 --- a/public/scripts/extensions/gallery/index.js +++ b/public/scripts/extensions/gallery/index.js @@ -296,7 +296,7 @@ function makeDragImg(id, url) { // Find the .drag-grabber and set its ID const dragGrabber = draggableElem.querySelector('.drag-grabber'); if (dragGrabber) { - dragGrabber.id = `zoomFor_${id}header`; + dragGrabber.id = `draggable_${id}header`; } } @@ -307,8 +307,9 @@ function makeDragImg(id, url) { const appendedElement = document.getElementById(`draggable_${id}`); if (appendedElement) { var elmntName = $(appendedElement); - dragElement(elmntName); loadMovingUIState(); + dragElement(elmntName); + // Prevent dragging the image console.log(`#draggable_${id} img`); diff --git a/public/style.css b/public/style.css index 9003a39a1..c2a856aca 100644 --- a/public/style.css +++ b/public/style.css @@ -3562,3 +3562,9 @@ a { margin-left: 10px; /* Give some space between the button and search box */ } + +.draggable img { + width: 100%; + height: 100%; + object-fit: cover; +} \ No newline at end of file