mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-21 07:46:58 +02:00
Remove mode checking code from missing_tag, as these validate anytime
This was causing it to not immediately flag "area with no tags" as an error. (until the user edited the area some other way)
This commit is contained in:
@@ -5,14 +5,12 @@ import { validationIssue, validationIssueFix } from '../core/validator';
|
||||
|
||||
export function validationIncompatibleSource() {
|
||||
var type = 'incompatible_source';
|
||||
|
||||
var invalidSources = [{id:'google', regex:'google'}];
|
||||
|
||||
var validation = function(entity, context) {
|
||||
var validation = function checkIncompatibleSource(entity, context) {
|
||||
var issues = [];
|
||||
|
||||
if (entity.tags && entity.tags.source) {
|
||||
|
||||
invalidSources.forEach(function(invalidSource) {
|
||||
var pattern = new RegExp(invalidSource.regex, 'i');
|
||||
|
||||
|
||||
@@ -4,12 +4,10 @@ import { services } from '../services';
|
||||
export function validationMaprules() {
|
||||
var type = 'maprules';
|
||||
|
||||
|
||||
var validation = function checkMaprules(entity, context) {
|
||||
if (!services.maprules) return [];
|
||||
|
||||
var graph = context.graph();
|
||||
|
||||
var rules = services.maprules.validationRules();
|
||||
var issues = [];
|
||||
|
||||
@@ -24,6 +22,5 @@ export function validationMaprules() {
|
||||
|
||||
validation.type = type;
|
||||
|
||||
|
||||
return validation;
|
||||
}
|
||||
|
||||
@@ -34,14 +34,6 @@ export function validationMissingTag() {
|
||||
return [];
|
||||
}
|
||||
|
||||
var mode = context.mode();
|
||||
if (entity.type === 'way' && mode &&
|
||||
(mode.id === 'draw-area' || (mode.id === 'draw-line' && !mode.isContinuing)) &&
|
||||
mode.wayID === entity.id) {
|
||||
// don't flag missing tag issues if drawing a new way
|
||||
return [];
|
||||
}
|
||||
|
||||
var messageObj = {};
|
||||
var missingTagType;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user