mirror of
https://github.com/FoggedLens/iD.git
synced 2026-02-13 17:23:02 +00:00
Select filtered preset with Enter
This commit is contained in:
@@ -677,16 +677,22 @@ a.selected:hover .toggle.icon { background-position: -40px -180px;}
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.preset-grid.filtered .grid-entry:first-child .grid-inner,
|
||||
.preset-grid .grid-entry .grid-inner:hover {
|
||||
background: #ececec;
|
||||
}
|
||||
|
||||
.preset-grid .grid-entry .grid-inner:hover {
|
||||
background: inherit;
|
||||
}
|
||||
|
||||
.grid-entry .grid-inner {
|
||||
position: absolute;
|
||||
border: 1px solid #ccc;
|
||||
left: 10px; right: 10px; top: 10px; bottom: 10px;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.grid-entry .grid-inner .preset-icon-fill.area {
|
||||
position: absolute;
|
||||
opacity: 0.4;
|
||||
|
||||
@@ -26,7 +26,13 @@ iD.ui.PresetGrid = function() {
|
||||
presets = filter(value);
|
||||
event.message('' + presets.length + ' results for ' + value);
|
||||
grid.call(drawGrid, presets);
|
||||
grid.classed('filtered', value.length);
|
||||
})
|
||||
.on('change', function() {
|
||||
var chosen = grid.selectAll('.grid-entry:first-child').datum();
|
||||
if (chosen) event.choose(chosen);
|
||||
});
|
||||
search.node().focus();
|
||||
|
||||
|
||||
function filter(value) {
|
||||
|
||||
@@ -113,6 +113,7 @@ iD.ui.TagEditor = function() {
|
||||
var taglistwrap = editorwrap.append('div').call(tagList, !tagview);
|
||||
|
||||
tageditor.tags(tags);
|
||||
event.change(tags);
|
||||
}
|
||||
|
||||
function drawHead(selection) {
|
||||
|
||||
Reference in New Issue
Block a user