mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-16 16:22:20 +00:00
feat(globe): answer both reset buttons through the globe actions store
The top-center and cockpit reset buttons call the location controls' new reset() through the globe actions store, and render a reset under way from it, instead of the location controls binding their clicks and the navigation writing their labels. The store keeps each owner's reset under way like its clear, and controls replaced mid-reset keep it on the buttons. LocationControls no longer takes resetButtons.
This commit is contained in:
1 parent
eccaeea0c4
commit
b4ee2321cf
17 files changed
+173
-84
No files matched your search
@@ -11,7 +11,7 @@ import GlobeCompass from './GlobeCompass.vue';
|
||||
// changes on every frame a rotating camera draws, so only the compass reads
|
||||
// it; the bar renders again only when the tilt changes.
|
||||
const globe = useGlobeActionsStore();
|
||||
const { clearBusy, camera } = storeToRefs(globe);
|
||||
const { clearBusy, resetBusy, camera } = storeToRefs(globe);
|
||||
const { act } = globe;
|
||||
const tilted = computed(() => Boolean(camera.value?.tilted));
|
||||
</script>
|
||||
@@ -28,7 +28,7 @@ const tilted = computed(() => Boolean(camera.value?.tilted));
|
||||
<span class="material-symbols-outlined" aria-hidden="true">view_in_ar</span>
|
||||
</button>
|
||||
<GlobeCompass @click="act('northUp')" />
|
||||
<button id="reset-globe-view" type="button" aria-label="Reset to full globe view" title="Reset camera and return to full globe view" data-i18n-aria-label data-i18n-title>
|
||||
<button id="reset-globe-view" type="button" :aria-label="resetBusy ? t('Resetting to full globe view') : t('Reset to full globe view')" title="Reset camera and return to full globe view" data-i18n-title @click="act('reset')">
|
||||
<span class="material-symbols-outlined" aria-hidden="true">public</span>
|
||||
</button>
|
||||
</nav>
|
||||
|
||||
Reference in new issue
Block a user