Cleanup some (unused) code

This commit is contained in:
2022-06-22 23:22:16 +02:00
parent 6d4224abea
commit 565c1c2be9
5 changed files with 7 additions and 12 deletions

View File

@@ -18,7 +18,7 @@
$: globeResolution = innerWidth > 1440 && window.devicePixelRatio > 1 ? '4k' : '2k'
const { continents, locations } = getContext('global')
const randomContinent = getRandomItem(continents.filter((cont: any) => cont.countries))
const randomContinent: any = getRandomItem(continents.filter((cont: any) => cont.countries))
const markers = locations.map(({ name, slug, country, globe_close: isClose, coordinates: { coordinates }}: any) => ({
name,
slug,
@@ -91,11 +91,10 @@
entries.forEach(({ isIntersecting }: IntersectionObserverEntry) => {
if (isIntersecting) {
globe.enable()
console.log('IO enable globe')
console.log('globe: IO enable')
} else {
globe.disable()
console.log('IO disable globe')
console.log('globe: IO disable')
}
})
}, {
@@ -103,12 +102,6 @@
rootMargin: '0px 0px 0px'
})
observer.observe(globeEl)
// const globeScroll = ScrollOut({
// targets: scope,
// onShown: () => globe.enable(),
// onHidden: () => globe.disable()
// })
})