Skip to content
Snippets Groups Projects
Commit e4eeaf5f authored by Timothee P's avatar Timothee P :sunflower:
Browse files

hide sidebar when toggling list view

parent 97667c35
No related branches found
No related tags found
No related merge requests found
...@@ -3,10 +3,9 @@ ...@@ -3,10 +3,9 @@
v-if="isOnline" v-if="isOnline"
:class="['sidebar-container', { expanded }]" :class="['sidebar-container', { expanded }]"
> >
<!-- <div class="sidebar-layers"></div> -->
<div <div
class="layers-icon" class="layers-icon"
@click="expanded = !expanded" @click="toggleSidebar()"
> >
<!-- // ! svg point d'interrogation pas accepté par linter --> <!-- // ! svg point d'interrogation pas accepté par linter -->
<!-- <?xml version="1.0" encoding="iso-8859-1"?> --> <!-- <?xml version="1.0" encoding="iso-8859-1"?> -->
...@@ -45,11 +44,6 @@ ...@@ -45,11 +44,6 @@
<div class="basemaps-title"> <div class="basemaps-title">
<h4> <h4>
Fonds cartographiques Fonds cartographiques
<!-- <span data-tooltip="Il est possible pour chaque fond cartographique de modifier l'ordre des couches"
data-position="bottom left">
<i class="question circle outline icon"></em>
</span> -->
</h4> </h4>
</div> </div>
...@@ -196,6 +190,10 @@ export default { ...@@ -196,6 +190,10 @@ export default {
return basemap.active !== undefined && basemap.active; return basemap.active !== undefined && basemap.active;
}, },
toggleSidebar(value) {
this.expanded = value !== undefined ? value : !this.expanded;
},
activateGroup(basemap) { activateGroup(basemap) {
this.baseMaps.forEach((basemap) => (basemap.active = false)); this.baseMaps.forEach((basemap) => (basemap.active = false));
basemap.active = true; basemap.active = true;
... ...
......
...@@ -21,7 +21,10 @@ ...@@ -21,7 +21,10 @@
id="map" id="map"
ref="map" ref="map"
/> />
<SidebarLayers v-if="basemaps && map" /> <SidebarLayers
v-if="basemaps && map"
ref="sidebar"
/>
<Geocoder /> <Geocoder />
<div <div
id="popup" id="popup"
...@@ -234,8 +237,10 @@ export default { ...@@ -234,8 +237,10 @@ export default {
'UPDATE_CHECKED_FEATURES' 'UPDATE_CHECKED_FEATURES'
]), ]),
setShowMap(e) { setShowMap(newValue) {
this.showMap = e; this.showMap = newValue;
//* expanded sidebar is visible under the list, even when the map is closed (position:absolute), solved by closing it whin switching to list
if (newValue === false) this.$refs.sidebar.toggleSidebar(false);
}, },
resetPagination() { resetPagination() {
this.pagination = { ...initialPagination }; this.pagination = { ...initialPagination };
... ...
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment