diff --git a/src/common/blueprints/experience-based.blueprint.ts b/src/common/blueprints/experience-based.blueprint.ts index b6d3799..e4dfe05 100644 --- a/src/common/blueprints/experience-based.blueprint.ts +++ b/src/common/blueprints/experience-based.blueprint.ts @@ -1,6 +1,6 @@ import { EventEmitter } from "events"; -// MODELS +// BLUEPRINTS import type { ExperienceBlueprint } from "./experience.blueprint"; // MODELS diff --git a/src/components/pages/home/MarkersToggleButton.vue b/src/components/pages/home/MarkersToggleButton.vue index 4f484cb..0bd7826 100644 --- a/src/components/pages/home/MarkersToggleButton.vue +++ b/src/components/pages/home/MarkersToggleButton.vue @@ -2,28 +2,21 @@ import { HomeExperience } from "~/experiences/home"; const experience = new HomeExperience(); -const visible = ref(false); - +const isMarkersDisplayed = useState("isMarkersDisplayed"); const onPress = () => { if (!experience?.ui) return; - if (experience.ui.isMarkersDisplayed) experience.ui.removeMarkers(); + if (isMarkersDisplayed.value) experience.ui.removeMarkers(); else experience.ui.displayMarks(); - - visible.value = experience.ui.isMarkersDisplayed; }; - -onMounted(() => { - if (!process.client) return; - - if (!experience) return; - visible.value = !!experience.ui?.isMarkersDisplayed; -});