forked from noxious/client
Possible keybinding fix
This commit is contained in:
parent
7c23b4e37e
commit
cf19bb4baa
@ -162,6 +162,9 @@ onBeforeUnmount(() => {
|
|||||||
function initKeyShortcuts (event: KeyboardEvent) {
|
function initKeyShortcuts (event: KeyboardEvent) {
|
||||||
if (!zoneEditorStore.zone) return
|
if (!zoneEditorStore.zone) return
|
||||||
|
|
||||||
|
// prevent if focussed on input
|
||||||
|
if (document.activeElement?.tagName === 'INPUT') return
|
||||||
|
|
||||||
if (event.key === 'm') {
|
if (event.key === 'm') {
|
||||||
zoneEditorStore.setTool('move')
|
zoneEditorStore.setTool('move')
|
||||||
}
|
}
|
||||||
|
@ -52,7 +52,6 @@ function fetchZones() {
|
|||||||
function loadZone(id: number) {
|
function loadZone(id: number) {
|
||||||
console.log('loadZone', id)
|
console.log('loadZone', id)
|
||||||
socket.connection.emit('gm:zone_editor:zone:request', { zoneId: id }, (response: Zone) => {
|
socket.connection.emit('gm:zone_editor:zone:request', { zoneId: id }, (response: Zone) => {
|
||||||
console.log('!!zone', response)
|
|
||||||
zoneEditorStore.setZone(response)
|
zoneEditorStore.setZone(response)
|
||||||
});
|
});
|
||||||
zoneEditorStore.toggleZoneListModal()
|
zoneEditorStore.toggleZoneListModal()
|
||||||
|
@ -30,7 +30,6 @@ export const useSocketStore: StoreDefinition = defineStore('socket', {
|
|||||||
|
|
||||||
// When we can't reconnect, disconnect
|
// When we can't reconnect, disconnect
|
||||||
this.connection.on('reconnect_failed', () => {
|
this.connection.on('reconnect_failed', () => {
|
||||||
console.log('Reconnect failed')
|
|
||||||
this.disconnectSocket()
|
this.disconnectSocket()
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user