projects
/
rails.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
daf9166
)
Call updatelinks when map moves
author
John Firebaugh
<john.firebaugh@gmail.com>
Thu, 18 Apr 2013 21:57:25 +0000
(14:57 -0700)
committer
John Firebaugh
<john.firebaugh@gmail.com>
Fri, 3 May 2013 17:52:42 +0000
(10:52 -0700)
Fixes systemed/iD#1330.
app/views/site/id_iframe.html.erb
patch
|
blob
|
history
diff --git
a/app/views/site/id_iframe.html.erb
b/app/views/site/id_iframe.html.erb
index 5c061ea3a40e42094bae78834e921a47d1cc17eb..b32b96a43aa330d5d9c9262ab425cc58eeb52ffd 100644
(file)
--- a/
app/views/site/id_iframe.html.erb
+++ b/
app/views/site/id_iframe.html.erb
@@
-28,6
+28,22
@@
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());
}