WIP
This commit is contained in:
parent
445ce7b6ba
commit
9c71d74ec9
1 changed files with 14 additions and 0 deletions
|
@ -434,6 +434,16 @@ L.U.Keys = {
|
||||||
}
|
}
|
||||||
|
|
||||||
L.U.Help = L.Class.extend({
|
L.U.Help = L.Class.extend({
|
||||||
|
|
||||||
|
SHORTCUTS: {
|
||||||
|
'Ctrl+M': L._('Draw a marker'),
|
||||||
|
'Ctrl+L': L._('Draw a polyline'),
|
||||||
|
'Ctrl+P': L._('Draw a polygon'),
|
||||||
|
'Ctrl+E': L._('Toggle edit mode'),
|
||||||
|
'Ctrl+S': L._('Save map'),
|
||||||
|
'Ctrl+I': L._('Open import panel'),
|
||||||
|
},
|
||||||
|
|
||||||
initialize: function (map) {
|
initialize: function (map) {
|
||||||
this.map = map
|
this.map = map
|
||||||
this.box = L.DomUtil.create(
|
this.box = L.DomUtil.create(
|
||||||
|
@ -525,6 +535,10 @@ L.U.Help = L.Class.extend({
|
||||||
for (const id in this.map.helpMenuActions) {
|
for (const id in this.map.helpMenuActions) {
|
||||||
addAction(this.map.helpMenuActions[id])
|
addAction(this.map.helpMenuActions[id])
|
||||||
}
|
}
|
||||||
|
const kbdList = L.DomUtil.create('div', 'kbd-list', container)
|
||||||
|
for (const [kbd, label] of Object.entries(this.SHORTCUTS)) {
|
||||||
|
L.DomUtil.add('span', '', kbdList, `<kbd>${kbd}</kbd> ${label}`)
|
||||||
|
}
|
||||||
return container
|
return container
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue