Cleanup some (unused) code
This commit is contained in:
@@ -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()
|
||||
// })
|
||||
})
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user