Merge branch 'master' into preset-list-arrow-key-navigation

This commit is contained in:
Quincy Morgan
2018-10-11 18:22:07 -07:00
102 changed files with 2254 additions and 369 deletions
+2 -2
View File
@@ -335,7 +335,7 @@ export default {
loadSigns: function(context, projection) {
// if we are looking at signs, we'll actually need to fetch images too
loadTiles('images', apibase + 'images?', projection);
loadTiles('objects', apibase + 'objects?', projection);
loadTiles('objects', apibase + 'map_features?layers=trafficsigns&', projection);
},
@@ -636,7 +636,7 @@ export default {
function loadDetection(detectionKey) {
var url = apibase + 'detections/' +
var url = apibase + 'image_detections/' +
detectionKey + '?' + utilQsString({ client_id: clientId });
d3_request(url)
+3 -1
View File
@@ -182,7 +182,9 @@ export default {
init: function() {
inflight = {};
taginfoCache = {};
popularKeys = {};
popularKeys = {
postal_code: true // #5377
};
// Fetch popular keys. We'll exclude these from `values`
// lookups because they stress taginfo, and they aren't likely
+1 -1
View File
@@ -15,7 +15,7 @@ export function svgTagClasses() {
var secondaries = [
'oneway', 'bridge', 'tunnel', 'embankment', 'cutting', 'barrier',
'surface', 'tracktype', 'footway', 'crossing', 'service', 'sport',
'public_transport'
'public_transport', 'location'
];
var tagClassRe = /^tag-/;
var _tags = function(entity) { return entity.tags; };
+7 -1
View File
@@ -49,8 +49,14 @@ export function uiFieldMaxspeed(field, context) {
.on('change', change)
.on('blur', change);
var childNodes = context.graph().childNodes(context.entity(entity.id)),
var loc;
if (entity.type === 'node') {
loc = entity.loc;
}
else {
var childNodes = context.graph().childNodes(context.entity(entity.id));
loc = childNodes[~~(childNodes.length/2)].loc;
}
isImperial = _some(dataImperial.features, function(f) {
return _some(f.geometry.coordinates, function(d) {
+26 -1
View File
@@ -23,9 +23,24 @@ export function uiRawMemberEditor(context) {
var taginfo = services.taginfo,
_entityID;
function downloadMember(d) {
d3_event.preventDefault();
// display the loading indicator
d3_select(this.parentNode).classed('tag-reference-loading', true);
context.loadEntity(d.id);
}
function selectMember(d) {
d3_event.preventDefault();
var entity = context.entity(d.id);
var mapExtent = context.map().extent();
if (!entity.intersects(mapExtent, context.graph())) {
// zoom to the entity if its extent is not visible now
context.map().zoomTo(entity);
}
context.enter(modeSelect(context, [d.id]));
}
@@ -125,9 +140,19 @@ export function uiRawMemberEditor(context) {
.text(function(d) { return utilDisplayName(d.member); });
} else {
d3_select(this).append('label')
var incompleteLabel = d3_select(this).append('label')
.attr('class', 'form-label')
.text(t('inspector.incomplete', { id: d.id }));
var wrap = incompleteLabel.append('div')
.attr('class', 'form-label-button-wrap');
wrap.append('button')
.attr('class', 'download-icon')
.attr('title', t('icons.download'))
.attr('tabindex', -1)
.call(svgIcon('#iD-icon-load'))
.on('click', downloadMember);
}
});