mirror of
https://github.com/FoggedLens/iD.git
synced 2026-04-30 23:47:59 +02:00
don't trigger line-is-area warning for tags implemented as 2 geometry-dedicated presets
e.g. `highway=elevator` in the "Elevator" and "Inclined Lift" presets
This commit is contained in:
@@ -43,6 +43,7 @@ _Breaking developer changes, which may affect downstream projects or sites that
|
||||
#### :camera: Street-Level
|
||||
#### :white_check_mark: Validation
|
||||
#### :bug: Bugfixes
|
||||
* Validator: Don't falsely flag certain tags as "should be a closed area" if the tag also allows both area and line geometries in two separate presets (e.g. `highway=elevator` in the "Elevator" and "Inclined Lift" presets)
|
||||
#### :earth_asia: Localization
|
||||
#### :hourglass: Performance
|
||||
#### :mortar_board: Walkthrough / Help
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import deepEqual from 'fast-deep-equal';
|
||||
|
||||
import { actionAddVertex } from '../actions/add_vertex';
|
||||
import { actionChangeTags } from '../actions/change_tags';
|
||||
import { actionMergeNodes } from '../actions/merge_nodes';
|
||||
@@ -27,7 +28,7 @@ export function validationMismatchedGeometry() {
|
||||
|
||||
var asLine = presetManager.matchTags(tagSuggestingArea, 'line');
|
||||
var asArea = presetManager.matchTags(tagSuggestingArea, 'area');
|
||||
if (asLine && asArea && asLine === asArea) {
|
||||
if (asLine && asArea && deepEqual(asLine.tags, asArea.tags)) {
|
||||
// this tag also allows lines and making this an area wouldn't matter
|
||||
return null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user