mirror of
https://github.com/FoggedLens/iD.git
synced 2026-03-31 17:20:30 +02:00
make background and geocoder exclusive
This commit is contained in:
@@ -44,14 +44,22 @@ iD.ui.Background = function(context) {
|
||||
button.classed('active', show);
|
||||
content.call(iD.ui.Toggle(show));
|
||||
shown = show;
|
||||
|
||||
if (show) {
|
||||
selection.on('mousedown.background-inside', function() {
|
||||
return d3.event.stopPropagation();
|
||||
});
|
||||
} else {
|
||||
selection.on('mousedown.background-inside', null);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
selection.on('mousedown.background-inside', function() {
|
||||
return d3.event.stopPropagation();
|
||||
context.surface().on('mousedown.background-outside', function() {
|
||||
setVisible(false);
|
||||
});
|
||||
|
||||
context.surface().on('mousedown.background-outside', function() {
|
||||
context.container().on('mousedown.background-outside', function() {
|
||||
setVisible(false);
|
||||
});
|
||||
|
||||
|
||||
@@ -86,6 +86,14 @@ iD.ui.Geocoder = function(context) {
|
||||
if (show) inputNode.node().focus();
|
||||
else inputNode.node().blur();
|
||||
shown = show;
|
||||
|
||||
if (show) {
|
||||
selection.on('mousedown.geocoder-inside', function() {
|
||||
return d3.event.stopPropagation();
|
||||
});
|
||||
} else {
|
||||
selection.on('mousedown.geocoder-inside', null);
|
||||
}
|
||||
}
|
||||
}
|
||||
var tooltip = bootstrap.tooltip()
|
||||
@@ -112,11 +120,8 @@ iD.ui.Geocoder = function(context) {
|
||||
var resultsList = selection.append('div')
|
||||
.attr('class', 'content fillD map-overlay hide');
|
||||
|
||||
selection.on('mousedown.geocoder-inside', function() {
|
||||
return d3.event.stopPropagation();
|
||||
});
|
||||
|
||||
context.surface().on('mousedown.geocoder-outside', hide);
|
||||
context.container().on('mousedown.b.geocoder-outside', hide);
|
||||
|
||||
var keybinding = d3.keybinding('geocoder');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user