-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
03ba7ea
commit 736d408
Showing
9 changed files
with
590 additions
and
156 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,71 @@ | ||
<template> | ||
<main> | ||
<BaseMap /> | ||
<div class="overlay"> | ||
<div class="top-bar"> | ||
<select v-model="selectedMap"> | ||
<option v-for="map in availableMaps" :value="map.id">{{ map.name }}</option> | ||
</select> | ||
<Filters /> | ||
</div> | ||
<component :is="selectedMapComponent" /> | ||
</main> | ||
</template> | ||
|
||
<script setup> | ||
import BaseMap from '@/components/BaseMap.vue'; | ||
import { computed, ref } from 'vue'; | ||
import MapContainerColor from '@/components/MapContainerColor.vue'; | ||
import MapContainerColorRadius from '@/components/MapContainerColorRadius.vue'; | ||
import MapContainerNotFilled from '@/components/MapContainerNotFilled.vue'; | ||
import MapContainerNotFilledTwoLayers from '@/components/MapContainerNotFilledTwoLayers.vue'; | ||
import Filters from '@/components/Filters.vue'; | ||
const availableMaps = [ | ||
{ | ||
id: 'just-color', | ||
name: 'dynamic color', | ||
component: MapContainerColor, | ||
}, | ||
{ | ||
id: 'color-and-radius-1', | ||
name: 'dynamic color and radius (cropyield)', | ||
component: MapContainerColorRadius, | ||
}, | ||
{ | ||
id: 'not-filled', | ||
name: 'circles not filled', | ||
component: MapContainerNotFilled, | ||
}, | ||
{ | ||
id: 'not-filled-2', | ||
name: 'circles not filled, two layers', | ||
component: MapContainerNotFilledTwoLayers, | ||
}, | ||
]; | ||
const selectedMap = ref(availableMaps[0].id); | ||
const selectedMapComponent = computed(() => { | ||
return availableMaps.find(({ id }) => id === selectedMap.value).component; | ||
}); | ||
</script> | ||
|
||
<style scoped> | ||
main { | ||
display: flex; | ||
flex-direction: column; | ||
height: 100vh; | ||
width: 100vw; | ||
overflow: hidden; | ||
} | ||
.top-bar { | ||
padding: 0.5rem 2rem; | ||
display: flex; | ||
flex-direction: row; | ||
gap: 0.5rem; | ||
align-items: center; | ||
} | ||
.overlay { | ||
position: absolute; | ||
left: 1rem; | ||
top: 1rem; | ||
top: 3rem; | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.