mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-14 13:18:15 +02:00
Add symbol for delete key
This commit is contained in:
@@ -97,22 +97,28 @@ iD.modes.DrawArea = function(wayId) {
|
||||
|
||||
map.surface.on('mousemove.drawarea', mousemove);
|
||||
map.surface.on('click.drawarea', click);
|
||||
map.keybinding().on('⎋.drawarea', esc)
|
||||
|
||||
map.keybinding()
|
||||
.on('⎋.drawarea', esc)
|
||||
.on('⌫.drawarea', backspace)
|
||||
.on('delete.drawarea', del)
|
||||
.on('⌦.drawarea', del)
|
||||
.on('↩.drawarea', ret);
|
||||
};
|
||||
|
||||
mode.exit = function() {
|
||||
mode.map.hint(false);
|
||||
mode.map.fastEnable(true);
|
||||
|
||||
mode.map.surface
|
||||
.on('mousemove.drawarea', null)
|
||||
.on('click.drawarea', null);
|
||||
mode.map.keybinding().on('⎋.drawarea', null)
|
||||
|
||||
mode.map.keybinding()
|
||||
.on('⎋.drawarea', null)
|
||||
.on('⌫.drawarea', null)
|
||||
.on('delete.drawarea', null)
|
||||
.on('⌦.drawarea', null)
|
||||
.on('↩.drawarea', null);
|
||||
|
||||
window.setTimeout(function() {
|
||||
mode.map.dblclickEnable(true);
|
||||
}, 1000);
|
||||
|
||||
@@ -108,23 +108,28 @@ iD.modes.DrawLine = function(wayId, direction) {
|
||||
controller.enter(iD.modes.Browse());
|
||||
}
|
||||
|
||||
map.keybinding().on('⎋.drawline', esc)
|
||||
map.keybinding()
|
||||
.on('⎋.drawline', esc)
|
||||
.on('⌫.drawline', backspace)
|
||||
.on('delete.drawline', del)
|
||||
.on('⌦.drawline', del)
|
||||
.on('↩.drawline', ret);
|
||||
};
|
||||
|
||||
mode.exit = function() {
|
||||
mode.map.hint(false);
|
||||
mode.map.fastEnable(true);
|
||||
mode.map
|
||||
.hint(false)
|
||||
.fastEnable(true);
|
||||
|
||||
mode.map.surface
|
||||
.on('mousemove.drawline', null)
|
||||
.on('click.drawline', null);
|
||||
mode.map.keybinding().on('⎋.drawline', null)
|
||||
|
||||
mode.map.keybinding()
|
||||
.on('⎋.drawline', null)
|
||||
.on('⌫.drawline', null)
|
||||
.on('delete.drawline', null)
|
||||
.on('⌦.drawline', null)
|
||||
.on('↩.drawline', null);
|
||||
|
||||
window.setTimeout(function() {
|
||||
mode.map.dblclickEnable(true);
|
||||
}, 1000);
|
||||
|
||||
@@ -39,8 +39,8 @@ d3.keybinding = function() {
|
||||
'⇞': 36, home: 36,
|
||||
// Insert key, or ins
|
||||
ins: 45, insert: 45,
|
||||
// Delete key, on Mac: ⌫ (Delete)
|
||||
del: 46, 'delete': 46,
|
||||
// Delete key, on Mac: ⌦ (Delete)
|
||||
'⌦': 46, del: 46, 'delete': 46,
|
||||
// Left Arrow Key, or ←
|
||||
'←': 37, left: 37, 'arrow-left': 37,
|
||||
// Up Arrow Key, or ↑
|
||||
|
||||
Reference in New Issue
Block a user