return d3.rebind(context, dispatch, 'on');
};
-iD.version = '1.3.5';
+iD.version = '1.3.6';
(function() {
var detected = {};
*/
iD.actions.Orthogonalize = function(wayId, projection) {
- var threshold = 7, // degrees within right or straight to alter
+ var threshold = 12, // degrees within right or straight to alter
lowerThreshold = Math.cos((90 - threshold) * Math.PI / 180),
upperThreshold = Math.cos(threshold * Math.PI / 180);
};
operation.available = function() {
- return selectedIDs.length === 1 &&
- context.entity(entityId).type === 'way' &&
- context.geometry(entityId) === 'area';
+ var graph = context.graph(),
+ entity = graph.entity(entityId);
+
+ if (selectedIDs.length !== 1 ||
+ entity.type !== 'way')
+ return false;
+ if (context.geometry(entityId) === 'area')
+ return true;
+ if (entity.isClosed() &&
+ graph.parentRelations(entity).some(function(r) { return r.isMultipolygon(); }))
+ return true;
+ return false;
};
operation.disabled = function() {
return rect;
}
- function updateParents(entity, insertions) {
+ function updateParents(entity, insertions, memo) {
+ if (memo && memo[entity.id]) return;
+ memo = memo || {};
+ memo[entity.id] = true;
+
head.parentWays(entity).forEach(function(parent) {
if (rectangles[parent.id]) {
rtree.remove(rectangles[parent.id]);
rtree.remove(rectangles[parent.id]);
insertions.push(parent);
}
- updateParents(parent, insertions);
+ updateParents(parent, insertions, memo);
});
}
"name": "New & Misaligned TIGER Roads",
"type": "tms",
"description": "At zoom level 16+, public domain map data from the US Census. At lower zooms, only changes since 2006 minus changes already incorporated into OpenStreetMap",
- "template": "http://{switch:a,b,c}.tiles.mapbox.com/v3/enf.ho204tap,enf.ho20a3n1,enf.game1617/{zoom}/{x}/{y}.png",
+ "template": "http://{switch:a,b,c}.tiles.mapbox.com/v3/enf.y5c4ygb9,enf.ho20a3n1,enf.game1617/{zoom}/{x}/{y}.png",
"scaleExtent": [
0,
22
"icon": "hospital",
"fields": [
"building_area",
- "social_facility",
"address",
"opening_hours"
]
],
"name": "Shelter"
},
+ "amenity/social_facility": {
+ "name": "Social Facility",
+ "geometry": [
+ "point",
+ "area"
+ ],
+ "terms": [],
+ "tags": {
+ "amenity": "social_facility"
+ },
+ "fields": [
+ "social_facility_for",
+ "address",
+ "phone",
+ "opening_hours",
+ "wheelchair",
+ "operator"
+ ]
+ },
+ "amenity/social_facility/food_bank": {
+ "name": "Food Bank",
+ "geometry": [
+ "point",
+ "area"
+ ],
+ "terms": [],
+ "tags": {
+ "amenity": "social_facility",
+ "social_facility": "food_bank"
+ },
+ "fields": [
+ "social_facility_for",
+ "address",
+ "phone",
+ "opening_hours",
+ "wheelchair",
+ "operator"
+ ]
+ },
+ "amenity/social_facility/group_home": {
+ "name": "Group Home",
+ "geometry": [
+ "point",
+ "area"
+ ],
+ "terms": [
+ "elderly",
+ "old",
+ "senior living"
+ ],
+ "tags": {
+ "amenity": "social_facility",
+ "social_facility": "group_home",
+ "social_facility_for": "senior"
+ },
+ "fields": [
+ "social_facility_for",
+ "address",
+ "phone",
+ "opening_hours",
+ "wheelchair",
+ "operator"
+ ]
+ },
+ "amenity/social_facility/homeless_shelter": {
+ "name": "Homeless Shelter",
+ "geometry": [
+ "point",
+ "area"
+ ],
+ "terms": [
+ "houseless",
+ "unhoused",
+ "displaced"
+ ],
+ "tags": {
+ "amenity": "social_facility",
+ "social_facility": "shelter",
+ "social_facility:for": "homeless"
+ },
+ "fields": [
+ "social_facility_for",
+ "address",
+ "phone",
+ "opening_hours",
+ "wheelchair",
+ "operator"
+ ]
+ },
"amenity/studio": {
"name": "Studio",
"geometry": [
]
},
"craft/painter": {
- "name": "painter",
+ "name": "Painter",
"geometry": [
"point",
"area"
"type": "typeCombo",
"label": "Type"
},
+ "social_facility_for": {
+ "key": "social_facility:for",
+ "type": "radio",
+ "label": "People served",
+ "placeholder": "Homeless, Disabled, Child, etc",
+ "options": [
+ "abused",
+ "child",
+ "disabled",
+ "diseased",
+ "drug_addicted",
+ "homeless",
+ "juvenile",
+ "mental_health",
+ "migrant",
+ "orphan",
+ "senior",
+ "underprivileged",
+ "unemployed",
+ "victim"
+ ]
+ },
"source": {
"key": "source",
"type": "text",
},
"locales": [
"af",
+ "sq",
"ar",
"ar-AA",
+ "hy",
"ast",
"bn",
"bs",
"ja",
"kn",
"ko",
+ "ko-KR",
"lv",
"lt",
"no",
"sl",
"es",
"sv",
+ "ta",
"te",
"tr",
"uk",
"shop": {
"label": "Type"
},
+ "social_facility_for": {
+ "label": "People served",
+ "placeholder": "Homeless, Disabled, Child, etc"
+ },
"source": {
"label": "Source"
},
"name": "Shelter",
"terms": "lean-to"
},
+ "amenity/social_facility": {
+ "name": "Social Facility",
+ "terms": ""
+ },
+ "amenity/social_facility/food_bank": {
+ "name": "Food Bank",
+ "terms": ""
+ },
+ "amenity/social_facility/group_home": {
+ "name": "Group Home",
+ "terms": "elderly,old,senior living"
+ },
+ "amenity/social_facility/homeless_shelter": {
+ "name": "Homeless Shelter",
+ "terms": "houseless,unhoused,displaced"
+ },
"amenity/studio": {
"name": "Studio",
"terms": "recording studio,studio,radio,radio studio,television,television studio"
"terms": "glasses,optician"
},
"craft/painter": {
- "name": "painter",
+ "name": "Painter",
"terms": "painter"
},
"craft/photographer": {