]> git.openstreetmap.org Git - rails.git/blobdiff - app/views/site/id_iframe.html.erb
Fix search results display (systemed/iD#1328)
[rails.git] / app / views / site / id_iframe.html.erb
index 5c061ea3a40e42094bae78834e921a47d1cc17eb..b32b96a43aa330d5d9c9262ab425cc58eeb52ffd 100644 (file)
         oauth_token_secret: "<%= token.secret %>"
       });
 
+    id.map().on('move.embed', function() {
+      var extent = id.map().extent(),
+          zoom = ~~id.map().zoom(),
+          center = id.map().center();
+
+      parent.updatelinks(
+        center[0],
+        center[1],
+        zoom,
+        null,
+        extent[0][0],
+        extent[0][1],
+        extent[1][0],
+        extent[1][1]);
+    });
+
     d3.select('#id-container')
       .call(id.ui());
   }