isHighwayIntersection only applies to nodes, so remove from osmEntity (#10831)

This commit is contained in:
Kyℓe Hensel
2025-03-04 21:29:29 +11:00
committed by GitHub
parent 8f39346bbc
commit 38d2ccd866
4 changed files with 2 additions and 12 deletions

View File

@@ -182,10 +182,6 @@ osmEntity.prototype = {
return Object.keys(this.tags).some(osmIsInterestingTag);
},
isHighwayIntersection: function() {
return false;
},
isDegenerate: function() {
return true;
},

View File

@@ -77,7 +77,7 @@ export function uiInspector(context) {
if (context.validator().getEntityIssues(entityID).length) return false;
// show turn restriction editor for junction vertices
if (entity.isHighwayIntersection(context.graph())) return false;
if (entity.type === 'node' && entity.isHighwayIntersection(context.graph())) return false;
// otherwise show preset list for uninteresting vertices
return true;

View File

@@ -78,7 +78,7 @@ export function uiSectionPresetFields(context) {
});
var singularEntity = _entityIDs.length === 1 && graph.hasEntity(_entityIDs[0]);
if (singularEntity && singularEntity.isHighwayIntersection(graph) && presetsManager.field('restrictions')) {
if (singularEntity && singularEntity.type === 'node' && singularEntity.isHighwayIntersection(graph) && presetsManager.field('restrictions')) {
_fieldsArr.push(
uiField(context, presetsManager.field('restrictions'), _entityIDs)
);