]> git.openstreetmap.org Git - rails.git/blobdiff - vendor/assets/iD/iD.js
Update to iD v1.3.6
[rails.git] / vendor / assets / iD / iD.js
index fd19d32de8f0ebedb489e3278b22ab63a3d91efb..6a8d7a87ae3c61c118a5b2f5f0c5ba99c62ec829 100644 (file)
@@ -16151,7 +16151,7 @@ window.iD = function () {
     return d3.rebind(context, dispatch, 'on');
 };
 
     return d3.rebind(context, dispatch, 'on');
 };
 
-iD.version = '1.3.5';
+iD.version = '1.3.6';
 
 (function() {
     var detected = {};
 
 (function() {
     var detected = {};
@@ -17783,7 +17783,7 @@ iD.actions.Noop = function() {
  */
 
 iD.actions.Orthogonalize = function(wayId, projection) {
  */
 
 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);
 
         lowerThreshold = Math.cos((90 - threshold) * Math.PI / 180),
         upperThreshold = Math.cos(threshold * Math.PI / 180);
 
@@ -20678,9 +20678,18 @@ iD.operations.Rotate = function(selectedIDs, context) {
     };
 
     operation.available = function() {
     };
 
     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() {
     };
 
     operation.disabled = function() {
@@ -22487,7 +22496,11 @@ iD.Tree = function(head) {
         return rect;
     }
 
         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]);
         head.parentWays(entity).forEach(function(parent) {
             if (rectangles[parent.id]) {
                 rtree.remove(rectangles[parent.id]);
@@ -22500,7 +22513,7 @@ iD.Tree = function(head) {
                 rtree.remove(rectangles[parent.id]);
                 insertions.push(parent);
             }
                 rtree.remove(rectangles[parent.id]);
                 insertions.push(parent);
             }
-            updateParents(parent, insertions);
+            updateParents(parent, insertions, memo);
         });
     }
 
         });
     }
 
@@ -45609,7 +45622,7 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081],"
             "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",
             "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
             "scaleExtent": [
                 0,
                 22
@@ -62599,7 +62612,6 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081],"
                 "icon": "hospital",
                 "fields": [
                     "building_area",
                 "icon": "hospital",
                 "fields": [
                     "building_area",
-                    "social_facility",
                     "address",
                     "opening_hours"
                 ]
                     "address",
                     "opening_hours"
                 ]
@@ -63338,6 +63350,95 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081],"
                 ],
                 "name": "Shelter"
             },
                 ],
                 "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": [
             "amenity/studio": {
                 "name": "Studio",
                 "geometry": [
@@ -64391,7 +64492,7 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081],"
                 ]
             },
             "craft/painter": {
                 ]
             },
             "craft/painter": {
-                "name": "painter",
+                "name": "Painter",
                 "geometry": [
                     "point",
                     "area"
                 "geometry": [
                     "point",
                     "area"
@@ -97652,6 +97753,28 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081],"
                 "type": "typeCombo",
                 "label": "Type"
             },
                 "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",
             "source": {
                 "key": "source",
                 "type": "text",
@@ -109637,8 +109760,10 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081],"
     },
     "locales": [
         "af",
     },
     "locales": [
         "af",
+        "sq",
         "ar",
         "ar-AA",
         "ar",
         "ar-AA",
+        "hy",
         "ast",
         "bn",
         "bs",
         "ast",
         "bn",
         "bs",
@@ -109667,6 +109792,7 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081],"
         "ja",
         "kn",
         "ko",
         "ja",
         "kn",
         "ko",
+        "ko-KR",
         "lv",
         "lt",
         "no",
         "lv",
         "lt",
         "no",
@@ -109684,6 +109810,7 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081],"
         "sl",
         "es",
         "sv",
         "sl",
         "es",
         "sv",
+        "ta",
         "te",
         "tr",
         "uk",
         "te",
         "tr",
         "uk",
@@ -110488,6 +110615,10 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081],"
                 "shop": {
                     "label": "Type"
                 },
                 "shop": {
                     "label": "Type"
                 },
+                "social_facility_for": {
+                    "label": "People served",
+                    "placeholder": "Homeless, Disabled, Child, etc"
+                },
                 "source": {
                     "label": "Source"
                 },
                 "source": {
                     "label": "Source"
                 },
@@ -110833,6 +110964,22 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081],"
                     "name": "Shelter",
                     "terms": "lean-to"
                 },
                     "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"
                 "amenity/studio": {
                     "name": "Studio",
                     "terms": "recording studio,studio,radio,radio studio,television,television studio"
@@ -111082,7 +111229,7 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081],"
                     "terms": "glasses,optician"
                 },
                 "craft/painter": {
                     "terms": "glasses,optician"
                 },
                 "craft/painter": {
-                    "name": "painter",
+                    "name": "Painter",
                     "terms": "painter"
                 },
                 "craft/photographer": {
                     "terms": "painter"
                 },
                 "craft/photographer": {