This commit is contained in:
parent
6770b52f89
commit
d6acedb384
@ -204,6 +204,13 @@ You should have received a copy of the GNU General Public License along with FG
|
||||
console.log('make a check worker: ', path.resolve(__dirname, 'check.js'))
|
||||
|
||||
const worker = new Worker(winURL)
|
||||
worker.onError = function(e) {
|
||||
worker.terminate()
|
||||
worker.view.max = 0
|
||||
worker.view.checkDialogVisible = false
|
||||
e.preventDefault(); // <-- "Hey browser, I handled it!"
|
||||
}
|
||||
|
||||
console.log(fileUrl('src/renderer/utils/check.js'))
|
||||
|
||||
worker.checking = this.checking
|
||||
@ -252,12 +259,6 @@ You should have received a copy of the GNU General Public License along with FG
|
||||
}
|
||||
// console.log(e.data)
|
||||
}
|
||||
worker.onError = function(e) {
|
||||
worker.terminate()
|
||||
worker.view.max = 0
|
||||
worker.view.checkDialogVisible = false
|
||||
e.preventDefault(); // <-- "Hey browser, I handled it!"
|
||||
}
|
||||
} catch (err) {
|
||||
console.error(err)
|
||||
}
|
||||
|
@ -89,6 +89,12 @@ You should have received a copy of the GNU General Public License along with FG
|
||||
name: 'leaflet-sidebar',
|
||||
components: { Help, AirportEdit, ArcEdit, CheckPanel, NodeEdit, ParkingEdit, ParkingGroupEdit, RunScan, FileSelect, SettingsPanel, Search, WorkInProgress },
|
||||
props: [],
|
||||
created () {
|
||||
window.addEventListener('keydown', this.doCommand)
|
||||
},
|
||||
destroyed () {
|
||||
window.removeEventListener('keydown', this.doCommand)
|
||||
},
|
||||
mounted () {
|
||||
this.add()
|
||||
},
|
||||
@ -100,6 +106,13 @@ You should have received a copy of the GNU General Public License along with FG
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
doCommand (e) {
|
||||
let cmd = String.fromCharCode(e.keyCode).toLowerCase()
|
||||
if (e.keyCode === 46 /** DEL */) {
|
||||
this.$parent.$parent.$refs.editLayer.deleteFeature()
|
||||
}
|
||||
console.log(cmd)
|
||||
},
|
||||
deferredMountedTo (parent) {
|
||||
this.sidebar = L.control.sidebar({
|
||||
autopan: false, // whether to maintain the centered map point when opening the sidebar
|
||||
|
Loading…
Reference in New Issue
Block a user