#236: Fixed clear button in map editor
This commit is contained in:
@ -12,7 +12,7 @@ export type TeleportSettings = {
|
||||
export const useZoneEditorStore = defineStore('zoneEditor', {
|
||||
state: () => {
|
||||
return {
|
||||
active: false,
|
||||
active: true,
|
||||
zone: null as Zone | null,
|
||||
tool: 'move',
|
||||
drawMode: 'tile',
|
||||
@ -27,6 +27,7 @@ export const useZoneEditorStore = defineStore('zoneEditor', {
|
||||
isZoneListModalShown: false,
|
||||
isCreateZoneModalShown: false,
|
||||
isSettingsModalShown: false,
|
||||
shouldClearTiles: false,
|
||||
zoneSettings: {
|
||||
name: '',
|
||||
width: 0,
|
||||
@ -106,6 +107,13 @@ export const useZoneEditorStore = defineStore('zoneEditor', {
|
||||
setTeleportSettings(teleportSettings: TeleportSettings) {
|
||||
this.teleportSettings = teleportSettings
|
||||
},
|
||||
triggerClearTiles() {
|
||||
this.shouldClearTiles = true
|
||||
},
|
||||
|
||||
resetClearTilesFlag() {
|
||||
this.shouldClearTiles = false
|
||||
},
|
||||
reset(resetZone = false) {
|
||||
if (resetZone) this.zone = null
|
||||
this.zoneList = []
|
||||
@ -118,6 +126,7 @@ export const useZoneEditorStore = defineStore('zoneEditor', {
|
||||
this.isSettingsModalShown = false
|
||||
this.isZoneListModalShown = false
|
||||
this.isCreateZoneModalShown = false
|
||||
this.shouldClearTiles = false
|
||||
}
|
||||
}
|
||||
})
|
||||
|
Reference in New Issue
Block a user