diff --git a/src/components/organisms/InteractiveGlobe2.svelte b/src/components/organisms/InteractiveGlobe2.svelte
index 8c80eef..fc0533b 100644
--- a/src/components/organisms/InteractiveGlobe2.svelte
+++ b/src/components/organisms/InteractiveGlobe2.svelte
@@ -13,6 +13,9 @@
export let type: string = undefined
export let enableMarkers: boolean = true
+ export let speed: number = 0.003
+ export let pane: boolean = import.meta.env.DEV
+ export let width: number = undefined
let innerWidth: number
let globeParentEl: HTMLElement, globeEl: HTMLElement
@@ -42,11 +45,11 @@
mapFile: `/images/globe-map-${globeResolution}.png`,
dpr: Math.min(Math.round(window.devicePixelRatio), 2),
autoRotate: true,
- speed: 0.003,
+ speed,
rotationStart: randomContinent.rotation,
enableMarkers,
markers,
- pane: import.meta.env.DEV,
+ pane,
})
// TODO: Define cluster locations and position it
@@ -112,54 +115,57 @@
-
- {#each markers as { name, slug, country, lat, lng }}
- -
-
-
- - {name}
- - {country.name}
-
-
+ {#if enableMarkers}
+
+ {#each markers as { name, slug, country, lat, lng }}
+ -
+
+
+ - {name}
+ - {country.name}
+
+
+
+ {/each}
+
+ -
+
- {/each}
+
- -
-
-
-
- {#if popinOpen}
-
-
-
-
+ {#if popinOpen}
+
+
+
+
+ {/if}
{/if}
\ No newline at end of file
diff --git a/src/modules/globe2/index.ts b/src/modules/globe2/index.ts
index 3037ed9..421721c 100644
--- a/src/modules/globe2/index.ts
+++ b/src/modules/globe2/index.ts
@@ -125,7 +125,7 @@ export class Globe {
this.addEvents()
// Setup markers
- if (this.markers) {
+ if (this.enableMarkers && this.markers) {
this.setupMarkers()
}
}
diff --git a/src/style/modules/_globe2.scss b/src/style/modules/_globe2.scss
index 7df29fa..e0af23a 100644
--- a/src/style/modules/_globe2.scss
+++ b/src/style/modules/_globe2.scss
@@ -1,14 +1,14 @@
// Globe
.globe {
+ --width: clamp(700px, 100vw, 1315px);
position: relative;
z-index: 10;
user-select: none;
-
// Inner
&__inner {
position: relative;
- width: clamp(700px, 100vw, 1315px);
+ width: var(--width);
margin-left: auto;
margin-right: auto;