diff options
| author | HJ <30-hj@users.noreply.git.pleroma.social> | 2022-08-01 11:46:57 +0000 |
|---|---|---|
| committer | HJ <30-hj@users.noreply.git.pleroma.social> | 2022-08-01 11:46:57 +0000 |
| commit | 8e7f3ea074d16a6c89fa7366a1f64302724f661f (patch) | |
| tree | 40e151399cfb1d9a3afd8576e05173a33a90b03f /src/components/popover | |
| parent | d0a09480b396e05d58957d193490e14a4ed12ccf (diff) | |
| parent | bd5d5c9df7e39efa7ecbb1bbfbd036906d1e9535 (diff) | |
Merge branch 'eslint-update' into 'develop'
update ESLint
See merge request pleroma/pleroma-fe!1576
Diffstat (limited to 'src/components/popover')
| -rw-r--r-- | src/components/popover/popover.js | 34 |
1 files changed, 19 insertions, 15 deletions
diff --git a/src/components/popover/popover.js b/src/components/popover/popover.js index 58f7126d..d2af59fe 100644 --- a/src/components/popover/popover.js +++ b/src/components/popover/popover.js @@ -104,21 +104,25 @@ const Popover = { // What are the screen bounds for the popover? Viewport vs container // when using viewport, using default margin values to dodge the navbar - const xBounds = this.boundTo && this.boundTo.x === 'container' ? { - min: parentScreenBox.left + (margin.left || 0), - max: parentScreenBox.right - (margin.right || 0) - } : { - min: 0 + (margin.left || 10), - max: window.innerWidth - (margin.right || 10) - } - - const yBounds = this.boundTo && this.boundTo.y === 'container' ? { - min: parentScreenBox.top + (margin.top || 0), - max: parentScreenBox.bottom - (margin.bottom || 0) - } : { - min: 0 + (margin.top || 50), - max: window.innerHeight - (margin.bottom || 5) - } + const xBounds = this.boundTo && this.boundTo.x === 'container' + ? { + min: parentScreenBox.left + (margin.left || 0), + max: parentScreenBox.right - (margin.right || 0) + } + : { + min: 0 + (margin.left || 10), + max: window.innerWidth - (margin.right || 10) + } + + const yBounds = this.boundTo && this.boundTo.y === 'container' + ? { + min: parentScreenBox.top + (margin.top || 0), + max: parentScreenBox.bottom - (margin.bottom || 0) + } + : { + min: 0 + (margin.top || 50), + max: window.innerHeight - (margin.bottom || 5) + } let horizOffset = 0 let vertOffset = 0 |
