Skip to content

Commit

Permalink
feat(map): add optionnal action menu to layer picker
Browse files Browse the repository at this point in the history
  • Loading branch information
0live committed Jan 16, 2025
1 parent 66e6c07 commit 87f8b21
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions vue/src/views/map/components/Atlases/MyMapAtlasDetails.vue
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
"
@update="updateThematicData(qgisMap.id)"
:sublayer-icon="true"
:withActions="false"
/>
</template>
<template v-else>
Expand Down
6 changes: 5 additions & 1 deletion vue/src/views/map/components/MyMapLayerPicker.vue
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
@click="isExpanded = !isExpanded"
/>
<v-menu
v-if="withActions"
location="bottom"
@update:modelValue="isLayerOpacityShown = mainLayer?.opacity && mainLayer?.opacity < 100"
>
Expand Down Expand Up @@ -115,9 +116,11 @@ const emits = defineEmits(['update'])
withDefaults(
defineProps<{
sublayerIcon: boolean
withActions: boolean
}>(),
{
sublayerIcon: false
sublayerIcon: false,
withActions: true
}
)
Expand Down Expand Up @@ -188,6 +191,7 @@ const downloadSourceData = async () => {
.MyMapLayerPicker {
display: flex;
flex-flow: column nowrap;
width: 100%;
.MyMapLayerPicker__parentBlock {
display: flex;
flex-flow: row nowrap;
Expand Down
2 changes: 2 additions & 0 deletions vue/src/views/map/components/MyMapPlatformLayers.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,14 @@
v-model:main-layer="myMapStore.projectLayer"
v-model:sub-layers="myMapStore.projectSubLayers"
:sublayerIcon="false"
:withActions="true"
@update="refreshLayer(ItemType.PROJECT)"
/>
<MyMapLayerPicker
v-model:main-layer="myMapStore.actorLayer"
v-model:sub-layers="myMapStore.actorSubLayers"
:sublayerIcon="false"
:withActions="true"
@update="refreshLayer(ItemType.ACTOR)"
/>
<MyMapLayerPicker
Expand Down

0 comments on commit 87f8b21

Please sign in to comment.