From 42fbb4fd568fb96a890c810e52467e4729511659 Mon Sep 17 00:00:00 2001 From: "Fabian @ Blax Software" Date: Tue, 3 Nov 2026 10:17:53 +0100 Subject: [PATCH] feat: the world map draws each village as its picture with , mountains where hills bunch up, and its fields, rulers and minimap frame in composited layers that dragging only moves The land comes from utils/terrain.ts like the minimap. One hover handler on the map instead of one per field; the hover popup hides while dragging like the click menu. Co-Authored-By: Claude Opus 5.5 --- app/components/map/Land.vue | 134 +++++++++++++ app/components/map/VillageMarker.vue | 129 ------------- app/components/map/WorldMap.vue | 272 +++++++++++---------------- app/pages/map/[worldId].vue | 4 +- 4 files changed, 241 insertions(+), 298 deletions(-) create mode 100644 app/components/map/Land.vue delete mode 100644 app/components/map/VillageMarker.vue diff --git a/app/components/map/Land.vue b/app/components/map/Land.vue new file mode 100644 index 0000000..6667ad2 --- /dev/null +++ b/app/components/map/Land.vue @@ -0,0 +1,134 @@ + + + diff --git a/app/components/map/VillageMarker.vue b/app/components/map/VillageMarker.vue deleted file mode 100644 index afdb048..0000000 --- a/app/components/map/VillageMarker.vue +++ /dev/null @@ -1,129 +0,0 @@ - - - diff --git a/app/components/map/WorldMap.vue b/app/components/map/WorldMap.vue index 42a6e0a..6331888 100644 --- a/app/components/map/WorldMap.vue +++ b/app/components/map/WorldMap.vue @@ -1,4 +1,5 @@ diff --git a/app/pages/map/[worldId].vue b/app/pages/map/[worldId].vue index 2902887..1628675 100644 --- a/app/pages/map/[worldId].vue +++ b/app/pages/map/[worldId].vue @@ -165,9 +165,9 @@ const popupAt = (x: number, y: number, below: boolean) => { top: below ? `${p.top + field.value + 4}px` : `${p.top - 4}px`, } } -const tip = computed(() => (hovered.value && hovered.value !== selectedVillage.value && visible.value ? hovered.value : null)) -/** While the map is dragged, the click menu stays hidden. */ +/** While the map is dragged, the click menu and the hover popup stay hidden. */ const dragging = ref(false) +const tip = computed(() => (hovered.value && hovered.value !== selectedVillage.value && visible.value && !dragging.value ? hovered.value : null)) const menu = computed(() => (selectedVillage.value && visible.value && !dragging.value ? selectedVillage.value : null)) function onDragMove(dx: number, dy: number) { dragging.value = true