|
@@ -2,6 +2,7 @@ import { debounce } from 'lodash'
|
|
|
|
|
|
|
|
const COLLAPSED_HEADER_HEIGHT = 75
|
|
const COLLAPSED_HEADER_HEIGHT = 75
|
|
|
const OFFSET_FOR_ENTRIES_ABOVE = 70
|
|
const OFFSET_FOR_ENTRIES_ABOVE = 70
|
|
|
|
|
+const GAP_BETWEEN_ENTRIES = 4
|
|
|
|
|
|
|
|
export const positionItems = debounce(
|
|
export const positionItems = debounce(
|
|
|
(
|
|
(
|
|
@@ -62,7 +63,7 @@ export const positionItems = debounce(
|
|
|
let top = getTopPosition(item, i === 0)
|
|
let top = getTopPosition(item, i === 0)
|
|
|
const bottom = top + rect.height
|
|
const bottom = top + rect.height
|
|
|
if (bottom > topLimit) {
|
|
if (bottom > topLimit) {
|
|
|
- top = topLimit - rect.height - 10
|
|
|
|
|
|
|
+ top = topLimit - rect.height - GAP_BETWEEN_ENTRIES
|
|
|
}
|
|
}
|
|
|
item.style.top = `${top}px`
|
|
item.style.top = `${top}px`
|
|
|
item.style.visibility = 'visible'
|
|
item.style.visibility = 'visible'
|
|
@@ -76,7 +77,7 @@ export const positionItems = debounce(
|
|
|
const rect = item.getBoundingClientRect()
|
|
const rect = item.getBoundingClientRect()
|
|
|
let top = getTopPosition(item, false)
|
|
let top = getTopPosition(item, false)
|
|
|
if (top < bottomLimit) {
|
|
if (top < bottomLimit) {
|
|
|
- top = bottomLimit + 10
|
|
|
|
|
|
|
+ top = bottomLimit + GAP_BETWEEN_ENTRIES
|
|
|
}
|
|
}
|
|
|
item.style.top = `${top}px`
|
|
item.style.top = `${top}px`
|
|
|
item.style.visibility = 'visible'
|
|
item.style.visibility = 'visible'
|