mirror of
https://github.com/FoggedLens/iD.git
synced 2026-06-05 14:38:05 +02:00
Merge branch 'master' into preset-list-arrow-key-navigation
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user