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

View File

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

View File

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