From 4c4e8ffe02e5e2a2d5ee5b9247bbde9527e749b1 Mon Sep 17 00:00:00 2001 From: Colin Kallemein Date: Fri, 7 Feb 2025 20:47:24 +0100 Subject: [PATCH] Better formatting --- .../mapEditor/partials/ListPanel.vue | 24 +++++++------------ 1 file changed, 8 insertions(+), 16 deletions(-) diff --git a/src/components/gameMaster/mapEditor/partials/ListPanel.vue b/src/components/gameMaster/mapEditor/partials/ListPanel.vue index a739330..23cb2bc 100644 --- a/src/components/gameMaster/mapEditor/partials/ListPanel.vue +++ b/src/components/gameMaster/mapEditor/partials/ListPanel.vue @@ -8,14 +8,14 @@
- - + +
Tags: @@ -41,7 +41,7 @@ const isOpen = ref(false) const tileStorage = new TileStorage() const searchQuery = ref('') const tiles = ref([]) -const lists = ref<'tiles' | 'objects'>('tiles') +const lists = ref(mapEditor.drawMode.value) defineExpose({ open: () => (isOpen.value = true), @@ -50,19 +50,11 @@ defineExpose({ }) watch(lists, (list) => { - if (list === 'tiles') { - mapEditor.setDrawMode('tile') - } else if (list === 'objects') { - mapEditor.setDrawMode('map_object') - } + mapEditor.setDrawMode(list) }) -watch(() => mapEditor.drawMode.value, (list) => { - if (list === 'tile') { - lists.value = 'tiles' - } else if (list === 'map_object') { - lists.value = 'objects' - } +watch(mapEditor.drawMode, (list) => { + lists.value = list }) let subscription: any = null