Skip to content

Commit

Permalink
Merge pull request #348 from IGNF/config/default-widget
Browse files Browse the repository at this point in the history
widget par défaut : searchengine et layswitcher
  • Loading branch information
IGNFhc authored Oct 16, 2024
2 parents 93a4148 + dd016c0 commit b1f2319
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
6 changes: 2 additions & 4 deletions src/components/carte/Controls.vue
Original file line number Diff line number Diff line change
Expand Up @@ -295,8 +295,7 @@ const mousePositionOptions = {
:share-options="shareOptions"
/>
<LayerSwitcher
v-if="controlOptions"
:visibility="props.controlOptions.includes(useControls.LayerSwitcher.id)"
:visibility="true"
:analytic="useControls.LayerSwitcher.analytic"
:layer-switcher-options="layerSwitcherOptions"
/>
Expand Down Expand Up @@ -343,8 +342,7 @@ const mousePositionOptions = {
:attributions-options="attributionsOptions"
/>
<SearchEngine
v-if="controlOptions"
:visibility="props.controlOptions.includes(useControls.SearchEngine.id)"
:visibility="true"
:analytic="useControls.SearchEngine.analytic"
:search-engine-options="searchEngineOptions"
/>
Expand Down
9 changes: 5 additions & 4 deletions src/composables/controls.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ export const useControls = {
},
SearchEngine: {
id: 'SearchEngine',
active: true,
disable: false,
active: false,
disable: true,
analytic: false
},
ScaleLine: {
Expand All @@ -32,8 +32,8 @@ export const useControls = {
},
LayerSwitcher: {
id: 'LayerSwitcher',
active: true,
disable: false,
active: false,
disable: true,
analytic: true
},
Legends: {
Expand Down Expand Up @@ -270,4 +270,5 @@ export function useControlsMenuOptions() {
disabled: useControls.Territories.disable
}
].filter(opt => Object.keys(useControls).includes(opt.name))
.filter(opt => opt.disabled === false)
}

0 comments on commit b1f2319

Please sign in to comment.