Fix button prefetch values and remove unused IO rootMargin

This commit is contained in:
2022-09-14 10:29:37 +02:00
parent 44959462ee
commit 683edc05fc
3 changed files with 3 additions and 9 deletions

View File

@@ -44,7 +44,7 @@
<a
href={url} class={classes}
{target} {rel}
data-sveltekit-prefetch={url && (isExternal || isProtocol) ? null : true}
data-sveltekit-prefetch={url && (isExternal || isProtocol) ? 'off' : ''}
data-sveltekit-noscroll={isExternal || isProtocol ? 'off' : ''}
{disabled}
tabindex="0"

View File

@@ -68,10 +68,7 @@
console.log('stop globe2')
}
})
}, {
threshold: 0,
rootMargin: '0px 0px 0px'
})
}, { threshold: 0 })
observer.observe(globeEl)

View File

@@ -118,10 +118,7 @@
// Run effect once
isIntersecting && observerPhotos.unobserve(target)
})
}, {
threshold: 0.3,
rootMargin: '0px 0px 0px'
})
}, { threshold: 0.3 })
// Photos MutationObserver
if (photos.length) {