mirror of
https://github.com/Stremio/stremio-web.git
synced 2026-04-06 13:40:22 +00:00
popup position diff fixed
This commit is contained in:
parent
8b473eeb47
commit
36ed693e50
1 changed files with 3 additions and 2 deletions
|
|
@ -54,12 +54,13 @@ class Popup extends Component {
|
|||
return;
|
||||
}
|
||||
|
||||
const bodyRect = document.body.getBoundingClientRect();
|
||||
const labelRect = this.labelRef.current.getBoundingClientRect();
|
||||
const labelPosition = {
|
||||
left: labelRect.x,
|
||||
top: labelRect.y,
|
||||
right: document.body.offsetWidth - (labelRect.x + labelRect.width),
|
||||
bottom: document.body.offsetHeight - (labelRect.y + labelRect.height)
|
||||
right: bodyRect.width - (labelRect.x + labelRect.width),
|
||||
bottom: bodyRect.height - (labelRect.y + labelRect.height)
|
||||
};
|
||||
const menuRect = this.menuRef.current.getBoundingClientRect();
|
||||
const menuStyle = {
|
||||
|
|
|
|||
Loading…
Reference in a new issue