Fix deselectClick. Fixes #179

This commit is contained in:
Tom MacWright
2012-12-04 17:51:05 -05:00
parent cdacdca2af
commit 82b14df12f

View File

@@ -354,18 +354,15 @@ iD.Map = function() {
}
function deselectClick() {
var hadSelection = !!selection;
if (hadSelection) {
if (selection.type === 'way') {
d3.select(d3.event.target)
.on('mousedown.drag', null)
.on('touchstart.drag', null);
}
redraw();
hideInspector();
if (selection && selection.type === 'way') {
d3.select(d3.event.target)
.on('mousedown.drag', null)
.on('touchstart.drag', null);
}
keybinding.on('⌫.deletefeature', null);
selection = null;
redraw();
hideInspector();
keybinding.on('⌫.deletefeature', null);
}
function removeEntity(entity) {