mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-14 21:28:11 +02:00
Use "nonsquare" instead of "nosquare" for marking unsquare ways as physically unsquare (re: #6332)
This commit is contained in:
@@ -507,6 +507,10 @@
|
||||
"old": {"natural": "waterfall"},
|
||||
"replace": {"waterway": "waterfall"}
|
||||
},
|
||||
{
|
||||
"old": {"nosquare": "*"},
|
||||
"replace": {"nonsquare": "$1"}
|
||||
},
|
||||
{
|
||||
"old": {"office": "real_estate"},
|
||||
"replace": {"office": "estate_agent"}
|
||||
|
||||
@@ -1854,6 +1854,7 @@
|
||||
{"key": "mining_resource", "description": "🄳 ➜ resource=*"},
|
||||
{"key": "natural", "value": "marsh", "description": "🄳 ➜ natural=wetland + wetland=marsh"},
|
||||
{"key": "natural", "value": "waterfall", "description": "🄳 ➜ waterway=waterfall"},
|
||||
{"key": "nosquare", "description": "🄳 ➜ nonsquare=*"},
|
||||
{"key": "office", "value": "real_estate", "description": "🄳 ➜ office=estate_agent"},
|
||||
{"key": "oneway", "value": "1", "description": "🄳 ➜ oneway=yes"},
|
||||
{"key": "oneway", "value": "alternate", "description": "🄳 ➜ oneway=alternating"},
|
||||
|
||||
@@ -22,10 +22,10 @@ export function actionOrthogonalize(wayID, projection, vertexID, ep, degThresh)
|
||||
var way = graph.entity(wayID);
|
||||
way = way.removeNode(''); // sanity check - remove any consecutive duplicates
|
||||
|
||||
if (way.tags.nosquare) {
|
||||
if (way.tags.nonsquare) {
|
||||
var tags = Object.assign({}, way.tags);
|
||||
// since we're squaring, remove indication that this is physically unsquare
|
||||
delete tags.nosquare;
|
||||
delete tags.nonsquare;
|
||||
way = way.update({tags: tags});
|
||||
}
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ export function validationUnsquareWay() {
|
||||
if (!isBuilding(entity, graph)) return [];
|
||||
|
||||
// don't flag ways marked as physically unsquare
|
||||
if (entity.tags.nosquare === 'yes') return [];
|
||||
if (entity.tags.nonsquare === 'yes') return [];
|
||||
|
||||
var isClosed = entity.isClosed();
|
||||
if (!isClosed) return []; // this building has bigger problems
|
||||
@@ -95,7 +95,7 @@ export function validationUnsquareWay() {
|
||||
var entityId = this.issue.entityIds[0];
|
||||
var entity = context.entity(entityId);
|
||||
var tags = Object.assign({}, entity.tags); // shallow copy
|
||||
tags.nosquare = 'yes';
|
||||
tags.nonsquare = 'yes';
|
||||
context.perform(
|
||||
actionChangeTags(entityId, tags),
|
||||
t('issues.fix.tag_as_unsquare.annotation')
|
||||
|
||||
Reference in New Issue
Block a user