Shortcuts for point/line/area should deselect tool

(closes #4003)
This commit is contained in:
Bryan Housel
2017-05-03 18:01:07 -04:00
parent 232fbf13c8
commit 7f2275bab9
+9 -3
View File
@@ -82,9 +82,15 @@ export function uiModes(context) {
var keybinding = d3keybinding('mode-buttons');
modes.forEach(function(m) {
keybinding.on(m.key, function() {
if (editable()) context.enter(m);
modes.forEach(function(mode) {
keybinding.on(mode.key, function() {
if (editable()) {
if (mode.id === context.mode().id) {
context.enter(modeBrowse(context));
} else {
context.enter(mode);
}
}
});
});