This commit is contained in:
Alex Dima 2020-02-23 22:42:40 +01:00
parent 97fc97c2f8
commit d5513f2fe2
No known key found for this signature in database
GPG key ID: 6E58D7B045760DA0

View file

@ -350,7 +350,7 @@ class Widget {
const [belowLeft, absoluteBelowLeft] = this._layoutHorizontalSegmentInPage(windowSize, domNodePosition, bottomLeft.left - ctx.scrollLeft + this._contentLeft, width);
// Leave some clearance to the top/bottom
const TOP_PADDING = 22 + (this._range?.startLineNumber === 2 ? this._lineHeight : 0);
const TOP_PADDING = 22;
const BOTTOM_PADDING = 22;
const fitsAbove = (absoluteAboveTop >= TOP_PADDING);
@ -369,7 +369,7 @@ class Widget {
return {
fitsAbove,
aboveTop: Math.max(aboveTop, TOP_PADDING),
aboveTop: aboveTop,
aboveLeft,
fitsBelow,
belowTop,