mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-19 23:14:47 +02:00
Don't flag missing tags for nodes on unloaded tiles
This commit is contained in:
@@ -6,7 +6,7 @@ import { utilDisplayLabel } from '../util';
|
||||
import { validationIssue, validationIssueFix } from '../core/validation';
|
||||
|
||||
|
||||
export function validationMissingTag() {
|
||||
export function validationMissingTag(context) {
|
||||
var type = 'missing_tag';
|
||||
|
||||
function hasDescriptiveTags(entity, graph) {
|
||||
@@ -43,8 +43,12 @@ export function validationMissingTag() {
|
||||
|
||||
var validation = function checkMissingTag(entity, graph) {
|
||||
|
||||
// ignore vertex features and relation members
|
||||
if (entity.geometry(graph) === 'vertex' || entity.hasParentRelations(graph)) {
|
||||
// we can't know if the node is a vertex if the tile is undownloaded
|
||||
if ((entity.type === 'node' && !context.connection().isDataLoaded(entity.loc)) ||
|
||||
// allow untagged nodes that are part of ways
|
||||
entity.geometry(graph) === 'vertex' ||
|
||||
// allow untagged entities that are part of relations
|
||||
entity.hasParentRelations(graph)) {
|
||||
return [];
|
||||
}
|
||||
|
||||
@@ -123,7 +127,6 @@ export function validationMissingTag() {
|
||||
}
|
||||
})];
|
||||
|
||||
|
||||
function showReference(selection) {
|
||||
selection.selectAll('.issue-reference')
|
||||
.data([0])
|
||||
|
||||
Reference in New Issue
Block a user