mirror of
https://github.com/FoggedLens/iD.git
synced 2026-03-01 08:53:41 +00:00
taginfo tooltips for combo values (#3299)
Each combo value obtained from taginfo now has a tooltip describing the value, if available.
This commit is contained in:
committed by
Bryan Housel
parent
7abf2870fe
commit
e1bdae7800
@@ -143,13 +143,14 @@ export function combo(field, context) {
|
||||
query: (isMulti ? field.key : '') + q
|
||||
}, function(err, data) {
|
||||
if (err) return;
|
||||
comboData = _.map(data, 'value').map(function(k) {
|
||||
comboData = _.map(data, function(d) {
|
||||
var k = d.value;
|
||||
if (isMulti) k = k.replace(field.key, '');
|
||||
var v = snake_case ? unsnake(k) : k;
|
||||
return {
|
||||
key: k,
|
||||
value: v,
|
||||
title: v
|
||||
title: isMulti ? v : d.title
|
||||
};
|
||||
});
|
||||
comboData = objectDifference(comboData, multiData);
|
||||
|
||||
Reference in New Issue
Block a user