mirror of
https://codeberg.org/yeentown/barkey.git
synced 2025-04-28 17:46:56 +00:00
Keep MkUserPopup from extending past left side of screen
This commit is contained in:
parent
101ca9e0f7
commit
19be113cb4
1 changed files with 1 additions and 1 deletions
|
@ -119,7 +119,7 @@ onMounted(() => {
|
||||||
}
|
}
|
||||||
|
|
||||||
const rect = props.source.getBoundingClientRect();
|
const rect = props.source.getBoundingClientRect();
|
||||||
const x = ((rect.left + (props.source.offsetWidth / 2)) - (300 / 2)) + window.scrollX;
|
const x = Math.max(2, ((rect.left + (props.source.offsetWidth / 2)) - (300 / 2)) + window.scrollX);
|
||||||
const y = rect.top + props.source.offsetHeight + window.scrollY;
|
const y = rect.top + props.source.offsetHeight + window.scrollY;
|
||||||
|
|
||||||
top.value = y;
|
top.value = y;
|
||||||
|
|
Loading…
Add table
Reference in a new issue