Skip to content
This repository has been archived by the owner on Feb 25, 2023. It is now read-only.

Commit

Permalink
fix DOMRect for vertical position calculation (#1986)
Browse files Browse the repository at this point in the history
  • Loading branch information
Shadowlauch authored and toasted-nutbread committed Oct 15, 2021
1 parent 157d5c9 commit f6c3461
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions ext/js/app/popup.js
Original file line number Diff line number Diff line change
Expand Up @@ -560,16 +560,16 @@ class Popup extends EventDispatcher {
const verticalOffset = optionsGeneral.popupVerticalOffset2 * offsetScale;

const [x, w] = this._getConstrainedPositionBinary(
elementRect.left - horizontalOffset,
elementRect.right + horizontalOffset,
elementRect.x - horizontalOffset,
elementRect.x + elementRect.width + horizontalOffset,
width,
viewport.left,
viewport.right,
preferRight
);
const [y, h, below] = this._getConstrainedPosition(
elementRect.bottom - verticalOffset,
elementRect.top + verticalOffset,
elementRect.y + elementRect.height - verticalOffset,
elementRect.y + verticalOffset,
height,
viewport.top,
viewport.bottom,
Expand Down

0 comments on commit f6c3461

Please sign in to comment.