When showing mapdata, background, or help panel, hide others

This commit is contained in:
Bryan Housel
2014-10-29 16:14:43 -04:00
parent 7c50c01bd3
commit 9c32b89e6a
3 changed files with 10 additions and 4 deletions

View File

@@ -294,8 +294,10 @@ iD.ui.Background = function(context) {
update();
setOpacity(opacityDefault);
var keybinding = d3.keybinding('background');
keybinding.on(key, toggle);
var keybinding = d3.keybinding('background')
.on(key, toggle)
.on('F', hide)
.on('H', hide);
d3.select(document)
.call(keybinding);

View File

@@ -140,7 +140,9 @@ iD.ui.Help = function(context) {
clickHelp(docs[0], 0);
var keybinding = d3.keybinding('help')
.on(key, toggle);
.on(key, toggle)
.on('B', hide)
.on('F', hide);
d3.select(document)
.call(keybinding);

View File

@@ -314,7 +314,9 @@ iD.ui.MapData = function(context) {
var keybinding = d3.keybinding('features')
.on(key, togglePanel)
.on('W', toggleWireframe);
.on('W', toggleWireframe)
.on('B', hidePanel)
.on('H', hidePanel);
// keybinding.on('m', function() {
// context.enter(iD.modes.SelectImage(context));