Better formatting
This commit is contained in:
parent
369522fda3
commit
4c4e8ffe02
@ -8,14 +8,14 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="flex">
|
<div class="flex">
|
||||||
<select class="input-field w-full" name="lists" v-model="lists">
|
<select class="input-field w-full" name="lists" v-model="lists">
|
||||||
<option value="tiles">Tiles</option>
|
<option value="tile">Tiles</option>
|
||||||
<option value="objects">Objects</option>
|
<option value="map_object">Objects</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="h-full overflow-auto relative border-0 border-t border-solid border-gray-500 p-2.5">
|
<div class="h-full overflow-auto relative border-0 border-t border-solid border-gray-500 p-2.5">
|
||||||
<TileList v-if="lists === 'tiles'" />
|
<TileList v-if="mapEditor.drawMode.value === 'tile'" />
|
||||||
<ObjectList v-if="lists === 'objects'" />
|
<ObjectList v-if="mapEditor.drawMode.value === 'map_object'" />
|
||||||
</div>
|
</div>
|
||||||
<div class="flex flex-col h-40 gap-2.5 p-3.5 border-t border-0 border-solid border-gray-500">
|
<div class="flex flex-col h-40 gap-2.5 p-3.5 border-t border-0 border-solid border-gray-500">
|
||||||
<span>Tags:</span>
|
<span>Tags:</span>
|
||||||
@ -41,7 +41,7 @@ const isOpen = ref(false)
|
|||||||
const tileStorage = new TileStorage()
|
const tileStorage = new TileStorage()
|
||||||
const searchQuery = ref('')
|
const searchQuery = ref('')
|
||||||
const tiles = ref<Tile[]>([])
|
const tiles = ref<Tile[]>([])
|
||||||
const lists = ref<'tiles' | 'objects'>('tiles')
|
const lists = ref<string>(mapEditor.drawMode.value)
|
||||||
|
|
||||||
defineExpose({
|
defineExpose({
|
||||||
open: () => (isOpen.value = true),
|
open: () => (isOpen.value = true),
|
||||||
@ -50,19 +50,11 @@ defineExpose({
|
|||||||
})
|
})
|
||||||
|
|
||||||
watch(lists, (list) => {
|
watch(lists, (list) => {
|
||||||
if (list === 'tiles') {
|
mapEditor.setDrawMode(list)
|
||||||
mapEditor.setDrawMode('tile')
|
|
||||||
} else if (list === 'objects') {
|
|
||||||
mapEditor.setDrawMode('map_object')
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
|
|
||||||
watch(() => mapEditor.drawMode.value, (list) => {
|
watch(mapEditor.drawMode, (list) => {
|
||||||
if (list === 'tile') {
|
lists.value = list
|
||||||
lists.value = 'tiles'
|
|
||||||
} else if (list === 'map_object') {
|
|
||||||
lists.value = 'objects'
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
|
|
||||||
let subscription: any = null
|
let subscription: any = null
|
||||||
|
Loading…
x
Reference in New Issue
Block a user