skip out of top viewport

This commit is contained in:
kawamataryo
2023-05-24 05:47:18 +09:00
parent 1043d1e45e
commit 5f11e76484
2 changed files with 13 additions and 1 deletions

View File

@@ -144,3 +144,8 @@ export const cleanBskyUserElements = () => {
})
}
}
export const isOutOfTopViewport = (el: Element) => {
const rect = el.getBoundingClientRect();
return rect.top < 0
}