fix DOMRect for vertical position calculation (#1986)
This commit is contained in:
parent
0a8992d215
commit
b3d38fce47
@ -560,16 +560,16 @@ class Popup extends EventDispatcher {
|
|||||||
const verticalOffset = optionsGeneral.popupVerticalOffset2 * offsetScale;
|
const verticalOffset = optionsGeneral.popupVerticalOffset2 * offsetScale;
|
||||||
|
|
||||||
const [x, w] = this._getConstrainedPositionBinary(
|
const [x, w] = this._getConstrainedPositionBinary(
|
||||||
elementRect.left - horizontalOffset,
|
elementRect.x - horizontalOffset,
|
||||||
elementRect.right + horizontalOffset,
|
elementRect.x + elementRect.width + horizontalOffset,
|
||||||
width,
|
width,
|
||||||
viewport.left,
|
viewport.left,
|
||||||
viewport.right,
|
viewport.right,
|
||||||
preferRight
|
preferRight
|
||||||
);
|
);
|
||||||
const [y, h, below] = this._getConstrainedPosition(
|
const [y, h, below] = this._getConstrainedPosition(
|
||||||
elementRect.bottom - verticalOffset,
|
elementRect.y + elementRect.height - verticalOffset,
|
||||||
elementRect.top + verticalOffset,
|
elementRect.y + verticalOffset,
|
||||||
height,
|
height,
|
||||||
viewport.top,
|
viewport.top,
|
||||||
viewport.bottom,
|
viewport.bottom,
|
||||||
|
Loading…
Reference in New Issue
Block a user