mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-14 21:28:11 +02:00
Followup changes to #7932
This commit is contained in:
@@ -115,7 +115,7 @@ export function presetPreset(presetID, preset, addable, allFields, allPresets) {
|
||||
};
|
||||
|
||||
|
||||
_this.reference = (geom) => {
|
||||
_this.reference = () => {
|
||||
// Lookup documentation on Wikidata...
|
||||
const qid = _this.tags.wikidata || _this.tags['brand:wikidata'] || _this.tags['operator:wikidata'];
|
||||
if (qid) {
|
||||
@@ -126,15 +126,6 @@ export function presetPreset(presetID, preset, addable, allFields, allPresets) {
|
||||
let key = _this.originalReference.key || Object.keys(utilObjectOmit(_this.tags, 'name'))[0];
|
||||
let value = _this.originalReference.value || _this.tags[key];
|
||||
|
||||
if (geom === 'relation' && key === 'type') {
|
||||
if (value in _this.tags) {
|
||||
key = value;
|
||||
value = _this.tags[key];
|
||||
} else {
|
||||
return { rtype: value };
|
||||
}
|
||||
}
|
||||
|
||||
if (value === '*') {
|
||||
return { key: key };
|
||||
} else {
|
||||
|
||||
@@ -425,7 +425,7 @@ export function uiPresetList(context) {
|
||||
};
|
||||
|
||||
item.preset = preset;
|
||||
item.reference = uiTagReference(preset.reference(entityGeometries()[0]), context);
|
||||
item.reference = uiTagReference(preset.reference(), context);
|
||||
|
||||
return item;
|
||||
}
|
||||
|
||||
@@ -125,9 +125,8 @@ export function uiSectionFeatureType(context) {
|
||||
if (!utilArrayIdentical(val, _presets)) {
|
||||
_presets = val;
|
||||
|
||||
var geometries = entityGeometries();
|
||||
if (_presets.length === 1 && geometries.length) {
|
||||
_tagReference = uiTagReference(_presets[0].reference(geometries[0]), context)
|
||||
if (_presets.length === 1) {
|
||||
_tagReference = uiTagReference(_presets[0].reference(), context)
|
||||
.showing(false);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -175,7 +175,7 @@ export function uiTagReference(what) {
|
||||
|
||||
|
||||
tagReference.body = function(selection) {
|
||||
var itemID = what.qid || what.rtype || (what.key + '-' + what.value);
|
||||
var itemID = what.qid || (what.key + '-' + (what.value || ''));
|
||||
_body = selection.selectAll('.tag-reference-body')
|
||||
.data([itemID], function(d) { return d; });
|
||||
|
||||
|
||||
Reference in New Issue
Block a user