Merge branch 'develop' into touch-walkthrough-update

This commit is contained in:
Quincy Morgan
2020-07-12 19:04:55 -04:00
2 changed files with 16 additions and 14 deletions
+7 -5
View File
@@ -122,14 +122,16 @@ export function uiFeatureList(context) {
if (!q) return result;
var idMatch = q.match(/^([nwr])([0-9]+)$/);
var idMatch = q.match(/(?:^|\W)(node|way|relation|[nwr])\W?0*([1-9]\d*)(?:\W|$)/i);
if (idMatch) {
var elemType = idMatch[1].charAt(0);
var elemId = idMatch[2];
result.push({
id: idMatch[0],
geometry: idMatch[1] === 'n' ? 'point' : idMatch[1] === 'w' ? 'line' : 'relation',
type: idMatch[1] === 'n' ? t('inspector.node') : idMatch[1] === 'w' ? t('inspector.way') : t('inspector.relation'),
name: idMatch[2]
id: elemType + elemId,
geometry: elemType === 'n' ? 'point' : elemType === 'w' ? 'line' : 'relation',
type: elemType === 'n' ? t('inspector.node') : elemType === 'w' ? t('inspector.way') : t('inspector.relation'),
name: elemId
});
}