mirror of
https://github.com/Stremio/stremio-web.git
synced 2026-04-20 10:42:12 +00:00
popup alignment fixed when body overflows
This commit is contained in:
parent
575ce81f86
commit
4c64a8297e
1 changed files with 4 additions and 4 deletions
|
|
@ -62,10 +62,10 @@ class Popup extends Component {
|
|||
const menuRect = this.menuRef.current.getBoundingClientRect();
|
||||
const labelRect = this.labelRef.current.getBoundingClientRect();
|
||||
const labelPosition = {
|
||||
left: labelRect.x,
|
||||
top: labelRect.y,
|
||||
right: bodyRect.width - (labelRect.x + labelRect.width),
|
||||
bottom: bodyRect.height - (labelRect.y + labelRect.height)
|
||||
left: labelRect.x - bodyRect.x,
|
||||
top: labelRect.y - bodyRect.y,
|
||||
right: (bodyRect.width + bodyRect.x) - (labelRect.x + labelRect.width),
|
||||
bottom: (bodyRect.height + bodyRect.y) - (labelRect.y + labelRect.height)
|
||||
};
|
||||
|
||||
if (menuRect.height <= labelPosition.bottom) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue