mirror of
https://github.com/FoggedLens/iD.git
synced 2026-06-05 14:38:05 +02:00
Merge branch 'master' into validation
This commit is contained in:
+17
-17
@@ -49,9 +49,9 @@ export function uiCombobox(context, klass) {
|
||||
.on('keydown.typeahead', keydown)
|
||||
.on('keyup.typeahead', keyup)
|
||||
.on('input.typeahead', change)
|
||||
.on('mousedown', mousedown)
|
||||
.each(addCaret);
|
||||
|
||||
|
||||
function addCaret() {
|
||||
var parent = this.parentNode;
|
||||
var sibling = this.nextSibling;
|
||||
@@ -65,22 +65,6 @@ export function uiCombobox(context, klass) {
|
||||
.attr('class', 'combobox-caret')
|
||||
.merge(caret);
|
||||
|
||||
caret
|
||||
.on('mousedown', function () {
|
||||
// prevent the form element from blurring. it blurs on mousedown
|
||||
d3_event.stopPropagation();
|
||||
d3_event.preventDefault();
|
||||
var combo = container.selectAll('.combobox');
|
||||
if (combo.empty()) {
|
||||
input.node().focus();
|
||||
fetch('', function() {
|
||||
show();
|
||||
render();
|
||||
});
|
||||
} else {
|
||||
hide();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -205,6 +189,22 @@ export function uiCombobox(context, klass) {
|
||||
}
|
||||
|
||||
|
||||
function mousedown() {
|
||||
// prevent the form element from blurring. it blurs on mousedown
|
||||
d3_event.stopPropagation();
|
||||
d3_event.preventDefault();
|
||||
var combo = container.selectAll('.combobox');
|
||||
if (combo.empty()) {
|
||||
input.node().focus();
|
||||
fetch('', function() {
|
||||
show();
|
||||
render();
|
||||
});
|
||||
} else {
|
||||
hide();
|
||||
}
|
||||
}
|
||||
|
||||
function nav(dir) {
|
||||
if (!_suggestions.length) return;
|
||||
|
||||
|
||||
@@ -46,9 +46,10 @@ export function uiInspector(context) {
|
||||
|
||||
var entity = context.entity(_entityID);
|
||||
|
||||
var isTaglessVertex = entity.geometry(context.graph()) === 'vertex' && !entity.hasNonGeometryTags();
|
||||
// start with the preset list if the feature is new or is a vertex with no tags
|
||||
var showPresetList = newFeature || isTaglessVertex;
|
||||
var isTaglessOrIntersectionVertex = entity.geometry(context.graph()) === 'vertex' &&
|
||||
(!entity.hasNonGeometryTags() && !entity.isHighwayIntersection(context.graph()));
|
||||
// start with the preset list if the feature is new or is an uninteresting vertex
|
||||
var showPresetList = newFeature || isTaglessOrIntersectionVertex;
|
||||
|
||||
if (showPresetList) {
|
||||
wrap.style('right', '-100%');
|
||||
|
||||
@@ -81,6 +81,8 @@ export function uiRawMemberEditor(context) {
|
||||
if (!context.hasEntity(d.relation.id)) {
|
||||
context.enter(modeBrowse(context));
|
||||
}
|
||||
|
||||
utilHighlightEntity(d.id, false, context);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user