Do not tolerate modifiers for action shortcuts.

Tolerates id-equality for selecting features.
This commit is contained in:
Tom MacWright
2013-01-22 10:39:10 -05:00
parent 3d90801e63
commit 38c02509ea
2 changed files with 6 additions and 1 deletions
+3
View File
@@ -186,15 +186,18 @@ window.iD = function(container) {
map.keybinding()
.on('a', function(evt, mods) {
if (mods) return;
controller.enter(iD.modes.AddArea());
})
.on('⌫.prevent_navigation', function(evt, mods) {
evt.preventDefault();
})
.on('p', function(evt, mods) {
if (mods) return;
controller.enter(iD.modes.AddPoint());
})
.on('l', function(evt, mods) {
if (mods) return;
controller.enter(iD.modes.AddLine());
})
.on('z', function(evt, mods) {
+3 -1
View File
@@ -138,7 +138,9 @@ iD.modes.Select = function(entity) {
});
surface.selectAll("*")
.filter(function (d) { return d === entity; })
.filter(function (d) {
return d && entity && d.id === entity.id;
})
.classed('selected', true);
};