Add symbol for delete key

This commit is contained in:
John Firebaugh
2012-12-13 13:33:15 -08:00
parent c37aa11408
commit 304a9c3603
3 changed files with 23 additions and 12 deletions
+10 -4
View File
@@ -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);
+11 -6
View File
@@ -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);
+2 -2
View File
@@ -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 ↑