Include route number in label of named route relations (#10478)

* iD#8707 Show ref in the name of route relations

* Avoid combining PTv2-formatted name with ref

* Pair name with other tags when labeling routes

---------

Co-authored-by: Kyle Hensel <k.y.l.e@outlook.co.nz>
This commit is contained in:
Minh Nguyễn
2024-11-03 16:38:00 -08:00
committed by GitHub
parent 5024feafe8
commit 6cfd1cf6fc
4 changed files with 75 additions and 5 deletions
+5 -1
View File
@@ -386,7 +386,11 @@ export function uiSectionRawMembershipEditor(context) {
.attr('class', 'member-entity-name')
.classed('has-colour', d => d.relation.tags.colour && isColourValid(d.relation.tags.colour))
.style('border-color', d => d.relation.tags.colour)
.text(function(d) { return utilDisplayName(d.relation); });
.html(function(d) {
const matched = presetManager.match(d.relation, context.graph());
// hide the network from the name if there is NSI match
return utilDisplayName(d.relation, matched.suggestion);
});
labelEnter
.append('button')