diff --git a/src/components/gameMaster/zoneEditor/ZoneEditor.vue b/src/components/gameMaster/zoneEditor/ZoneEditor.vue index 34bd3eb..736b5b7 100644 --- a/src/components/gameMaster/zoneEditor/ZoneEditor.vue +++ b/src/components/gameMaster/zoneEditor/ZoneEditor.vue @@ -247,7 +247,7 @@ function handleMove() { console.log('move btn clicked') } -onBeforeMount(() => { +onBeforeMount(async () => { tileArray.forEach((row, y) => row.forEach((_, x) => placeTile(zoneTilemap, tiles, x, y, 'blank_tile'))) if (zone.value?.tiles) { @@ -256,7 +256,7 @@ onBeforeMount(() => { } zoneEventTiles = zone.value?.zoneEventTiles ?? [] - zoneObjects = sortByIsometricDepth(zone.value?.zoneObjects ?? [], zoneTilemap.width) + zoneObjects = sortByIsometricDepth(zone.value?.zoneObjects ?? []) // Center camera const centerY = (zoneTilemap.height * zoneTilemap.tileHeight) / 2 diff --git a/src/components/zone/Zone.vue b/src/components/zone/Zone.vue index 69be63c..e2967fd 100644 --- a/src/components/zone/Zone.vue +++ b/src/components/zone/Zone.vue @@ -5,18 +5,22 @@