This is too fancy, remove it
This commit is contained in:
@@ -1,12 +0,0 @@
|
||||
export function limitHeightToViewport(el, sizing = true, margin = 64) {
|
||||
if (!el) return
|
||||
|
||||
if (sizing) {
|
||||
const rect = el.getBoundingClientRect()
|
||||
const top = Math.max(rect.top, margin)
|
||||
const max = Math.max(0, window.innerHeight - margin - top)
|
||||
el.style.maxHeight = `${max}px`
|
||||
} else {
|
||||
el.style.maxHeight = ""
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user