Formatting

This commit is contained in:
pythongosssss 2023-03-30 20:15:12 +01:00
parent c93dc2fb89
commit 3a5bcdf8b9

View File

@ -57,11 +57,11 @@ function dragElement(dragEl, settings) {
function ensureInBounds() {
if (dragEl.classList.contains("comfy-menu-manual-pos")) {
newPosX = Math.min(document.body.clientWidth - dragEl.clientWidth, Math.max(0, dragEl.offsetLeft));
newPosY = Math.min(document.body.clientHeight - dragEl.clientHeight, Math.max(0, dragEl.offsetTop));
newPosX = Math.min(document.body.clientWidth - dragEl.clientWidth, Math.max(0, dragEl.offsetLeft));
newPosY = Math.min(document.body.clientHeight - dragEl.clientHeight, Math.max(0, dragEl.offsetTop));
positionElement();
}
positionElement();
}
}
function positionElement() {