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