mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-13 12:55:19 +00:00
refac
This commit is contained in:
parent
fe7e7abf15
commit
2e231982a3
1 changed files with 8 additions and 5 deletions
|
|
@ -27,12 +27,15 @@
|
||||||
// Adjust based on parent rect
|
// Adjust based on parent rect
|
||||||
const top = rect.bottom - parentRect.top;
|
const top = rect.bottom - parentRect.top;
|
||||||
const left = rect.left - parentRect.left;
|
const left = rect.left - parentRect.left;
|
||||||
|
if (buttonsContainerElement) {
|
||||||
buttonsContainerElement.style.display = 'block';
|
buttonsContainerElement.style.display = 'block';
|
||||||
buttonsContainerElement.style.left = `${left}px`;
|
buttonsContainerElement.style.left = `${left}px`;
|
||||||
buttonsContainerElement.style.top = `${top + 5}px`; // +5 to add some spacing
|
buttonsContainerElement.style.top = `${top + 5}px`; // +5 to add some spacing
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
buttonsContainerElement.style.display = 'none';
|
if (buttonsContainerElement) {
|
||||||
|
buttonsContainerElement.style.display = 'none';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}, 0);
|
}, 0);
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue