mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2025-04-20 03:13:30 +00:00
Formatting
This commit is contained in:
parent
c93dc2fb89
commit
3a5bcdf8b9
@ -57,11 +57,11 @@ function dragElement(dragEl, settings) {
|
|||||||
|
|
||||||
function ensureInBounds() {
|
function ensureInBounds() {
|
||||||
if (dragEl.classList.contains("comfy-menu-manual-pos")) {
|
if (dragEl.classList.contains("comfy-menu-manual-pos")) {
|
||||||
newPosX = Math.min(document.body.clientWidth - dragEl.clientWidth, Math.max(0, dragEl.offsetLeft));
|
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));
|
newPosY = Math.min(document.body.clientHeight - dragEl.clientHeight, Math.max(0, dragEl.offsetTop));
|
||||||
|
|
||||||
positionElement();
|
positionElement();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function positionElement() {
|
function positionElement() {
|
||||||
|
Loading…
Reference in New Issue
Block a user