From b7ad1f8ea17563f4fdf5ebb875b242fe0770c657 Mon Sep 17 00:00:00 2001 From: Frank Elsinga Date: Sun, 22 Jan 2023 23:00:44 +0100 Subject: [PATCH] migrated 1f050e8cf3bf03a3d8c9176548584fc1e5fe4043 --- webclient/src/components/DetailsRoomfinderMap.vue | 5 ++++- webclient/src/views/DetailsView.vue | 4 ++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/webclient/src/components/DetailsRoomfinderMap.vue b/webclient/src/components/DetailsRoomfinderMap.vue index c8a129755..4981379b0 100644 --- a/webclient/src/components/DetailsRoomfinderMap.vue +++ b/webclient/src/components/DetailsRoomfinderMap.vue @@ -3,7 +3,10 @@ import { selectedMap, useDetailsStore } from "@/stores/details"; const state = useDetailsStore(); -defineExpose({ loadRoomfinderMap }); +defineExpose({ + loadRoomfinderMap, + loadRoomfinderModalMap, +}); function loadRoomfinderMap(mapIndex: number, fromUi = false) { const map = state.data?.maps.roomfinder?.available[mapIndex]; if (!map) { diff --git a/webclient/src/views/DetailsView.vue b/webclient/src/views/DetailsView.vue index 0fe52b878..d3caf7dd8 100644 --- a/webclient/src/views/DetailsView.vue +++ b/webclient/src/views/DetailsView.vue @@ -106,6 +106,10 @@ onMounted(() => { coord_counter.value.counter = Object.keys(coords).length; }; window.addEventListener("storage", updateCoordinateCounter); + window.addEventListener("resize", () => { + roomfinderMap.value.loadRoomfinderMap(state.map.roomfinder.selected_index); + roomfinderMap.value.loadRoomfinderModalMap(); + }); updateCoordinateCounter(); nextTick(() => {