]> git.openstreetmap.org Git - rails.git/blobdiff - vendor/assets/iD/iD.js
Update to iD v2.1.2
[rails.git] / vendor / assets / iD / iD.js
index 3fbd5ce7ebb26b92f5a0fdc5c273459003c025b9..22a9842abb6b9fe69bc5cdba736b27cd9bd9354c 100644 (file)
@@ -50891,14 +50891,20 @@ function modeDragNode$$1(context) {
     function start(entity) {
         wasMidpoint = entity.type === 'midpoint';
 
-        // vertices classed "sibling" include:  (see svg/vertices.js)
-        // - children of selected ways or multipolygons
-        // - vertices sharing a way with selected vertices
-        var selection$$1 = selectAll('g.vertex-persistent.' + entity.id),
-            isSelected = !selection$$1.empty() &&
-                (selection$$1.classed('selected') || selection$$1.classed('sibling'));
-
-        isCancelled = event.sourceEvent.shiftKey || !(wasMidpoint || isSelected) ||
+        // Things allowed to be dragged include:
+        // - midpoints
+        // - nodes that are selected
+        // - vertices that are selected
+        // - vertices classed 'sibling' which includes (see svg/vertices.js)
+        //   - children of selected ways or multipolygons
+        //   - vertices sharing a way with selected vertices
+        var selector$$1 = 'g.node.point.selected.' + entity.id +
+            ', g.vertex-persistent.selected.' + entity.id +
+            ', g.vertex-persistent.sibling.' + entity.id;
+
+        var isDraggable = wasMidpoint || !select(selector$$1).empty();
+
+        isCancelled = event.sourceEvent.shiftKey || !isDraggable ||
             context.features().hasHiddenConnections(entity, context.graph());
 
         if (isCancelled) {
@@ -67924,7 +67930,7 @@ function coreContext() {
 
 
     /* Init */
-    context.version = '2.1.1';
+    context.version = '2.1.2';
 
     context.projection = geoRawMercator();