Skip to content

Commit

Permalink
#835 Close Safari buttom bar for fullscreen map
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewtavis committed Sep 26, 2024
1 parent 2958f1f commit c0272f3
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions frontend/components/media/MediaMap.vue
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,13 @@ const isTouchDevice =
"ontouchstart" in window ||
navigator.maxTouchPoints > 0;
const applyMaxWindowHeight = () => {
document.documentElement.style.setProperty(
"--app-height",
`${window.innerHeight}px`
);
};
function isWebglSupported() {
if (window.WebGLRenderingContext) {
const canvas = document.createElement("canvas");
Expand Down Expand Up @@ -242,6 +249,8 @@ onMounted(() => {
})
);
map.on("fullscreenchange", applyMaxWindowHeight);
const popup = new maplibregl.Popup({
offset: 25,
}).setHTML(
Expand Down Expand Up @@ -433,3 +442,18 @@ onMounted(() => {
});
});
</script>

<style scoped>
:root {
--app-height: 100%;
}
html,
body {
padding: 0;
margin: 0;
overflow: hidden;
width: 100vw;
height: 100vh;
height: var(--app-height);
}
</style>

0 comments on commit c0272f3

Please sign in to comment.