Skip to content

Commit

Permalink
Fix sur les css + ajout TODO
Browse files Browse the repository at this point in the history
  • Loading branch information
lowzonenose committed Apr 29, 2024
1 parent 90a8ef2 commit 7593939
Show file tree
Hide file tree
Showing 12 changed files with 37 additions and 34 deletions.
7 changes: 0 additions & 7 deletions src/assets/controls.css

This file was deleted.

12 changes: 0 additions & 12 deletions src/assets/ol.css

This file was deleted.

11 changes: 9 additions & 2 deletions src/components/carte/Map.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ const mapRef = ref(0)
/**
* Map
* default controls are removed (rotate, zoom and attributions)
*/
const map = new Map({
controls: [] // on supprime les contrôles par defaut !
Expand All @@ -34,7 +35,7 @@ const onFocusOnMap = () => {
mapRef.value.focus();
}
// rendre disponible 'map' aux composants enfannts imbriqués
// rendre disponible 'map' aux composants enfants imbriqués
provide('map', map)
</script>
Expand All @@ -50,4 +51,10 @@ provide('map', map)
</div>
</template>

<style scoped></style>
<style>
#map {
margin-left: 0;
width: inherit;
height: 70vh;
}
</style>
7 changes: 2 additions & 5 deletions src/components/carte/View.vue
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,6 @@ onMounted(() => {
})
</script>

<template>
<div />
</template>
<template></template>

<style scoped>
</style>
<style scoped></style>
4 changes: 3 additions & 1 deletion src/components/carte/control/Attributions.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,6 @@ onUpdated(() => {

<template></template>

<style scoped></style>
<style scoped>
/* TODO style DSFR */
</style>
9 changes: 8 additions & 1 deletion src/components/carte/control/OverviewMap.vue
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,11 @@ onUpdated(() => {

<template></template>

<style scoped></style>
<style>
#map .ol-custom-overviewmap {
bottom: 30px;
left: auto;
right: 20px;
top: auto;
}
</style>
8 changes: 6 additions & 2 deletions src/components/carte/control/SearchEngine.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const searchEngine = ref(new SearchEngine(props.searchEngineOptions))
onMounted(() => {
if (props.visibility) {
map.addControl(searchEngine.value)
// abonnement au widget
/** abonnement au widget */
searchEngine.value.on("searchengine:search:click", onClickSearch);
}
})
Expand Down Expand Up @@ -51,4 +51,8 @@ const onClickSearch = (e) => {

<template></template>

<style scoped></style>
<style>
div[id^="GPsearchEngine-"]{
left: 40vw;
}
</style>
4 changes: 3 additions & 1 deletion src/components/carte/control/Zoom.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,6 @@ onUpdated(() => {

<template></template>

<style scoped></style>
<style scoped>
/* TODO style DSFR */
</style>
1 change: 1 addition & 0 deletions src/composables/controls.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ export const useControls = {
ScaleLine: 'ScaleLine',
Zoom: 'Zoom',
// Attributions: 'Attributions'
// Rotate: 'Rotate'
}
2 changes: 0 additions & 2 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ import router from './router/index'
import * as icons from './icons'

import './main.css'
import './assets/ol.css'
import './assets/controls.css'

addIcons(...Object.values(icons)) // Autoimporté grâce à ohVueIconAutoimportPreset dans vite.config.ts

Expand Down
2 changes: 2 additions & 0 deletions src/views/Carto.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ const store = useMapStore()
store.setZoom(12)
store.setCenter([-234814.550892, 4774562.534805])
// TODO enregistrer la liste des couches dans le store & localStorage
// TODO definir la couche par defaut ou les couches utilisateurs (localStorage)
const layers = [
new TileLayer({
source: new OSM(),
Expand Down
4 changes: 3 additions & 1 deletion tsconfig.app.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
"baseUrl": ".",
"paths": {
"@/*": ["./src/*"]
}
},
"allowJs": true,
"noImplicitAny": false
}
}

0 comments on commit 7593939

Please sign in to comment.