most of it

This commit is contained in:
2023-09-18 17:31:11 +00:00
parent 5f27fe0c5b
commit 481308522f
380 changed files with 3015 additions and 2480 deletions

View File

@@ -1,7 +1,7 @@
export default function inView(node, params = { threshold: 0 }) {
let observer
export default function inView(node: Element, params = { threshold: 0 }) {
let observer: IntersectionObserver
const handleIntersect = (e) => {
const handleIntersect = (e: any) => {
const v = e[0].isIntersecting ? "enter" : "exit"
node.dispatchEvent(new CustomEvent(v))
}
@@ -16,7 +16,7 @@ export default function inView(node, params = { threshold: 0 }) {
setObserver(params)
return {
update(params) {
update(params: any) {
setObserver(params)
},