Skip to content

Commit

Permalink
Merge pull request #228 from IGNF/fix/overviewmap
Browse files Browse the repository at this point in the history
πŸš‘ suppression malencontreuse du beforeupdate
  • Loading branch information
IGNFhc authored Jun 6, 2024
2 parents 76d7215 + 65888ea commit 9006201
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/components/carte/control/OverviewMap.vue
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,15 @@ onMounted(() => {
}
})
onBeforeUpdate(() => {
if (props.visibility && !isSmallScreen.value) {
map.addControl(overviewMap.value)
}
else {
map.removeControl(overviewMap.value)
}
})
</script>

<template></template>
Expand Down

0 comments on commit 9006201

Please sign in to comment.