projects
/
rails.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
60363a4
)
When asked to edit an object centre on the correct location
author
Tom Hughes
<tom@compton.nu>
Sat, 26 Nov 2011 16:39:52 +0000
(16:39 +0000)
committer
Tom Hughes
<tom@compton.nu>
Sat, 26 Nov 2011 16:39:52 +0000
(16:39 +0000)
app/views/site/_potlatch2.html.erb
patch
|
blob
|
history
diff --git
a/app/views/site/_potlatch2.html.erb
b/app/views/site/_potlatch2.html.erb
index e7a2564f916eb97118ffba9433147f9f752b2b7a..c443a917ac272f5eb6c40a46990411cfdba132ab 100644
(file)
--- a/
app/views/site/_potlatch2.html.erb
+++ b/
app/views/site/_potlatch2.html.erb
@@
-60,7
+60,15
@@
// 700,600 for fixed size, 100%,100% for resizable
}
// 700,600 for fixed size, 100%,100% for resizable
}
+ <% if params[:node] -%>
+ <% bbox = Node.find(params[:node]).bbox.to_unscaled -%>
+ doSWF(<%= bbox.centre_lat %>,<%= bbox.centre_lon %>,16);
+ <% elsif params[:way] -%>
+ <% bbox = Way.find(params[:way]).bbox.to_unscaled -%>
+ doSWF(<%= bbox.centre_lat %>,<%= bbox.centre_lon %>,16);
+ <% else -%>
doSWF(<%= @lat || 'null' %>,<%= @lon || 'null' %>,<%= @zoom %>);
doSWF(<%= @lat || 'null' %>,<%= @lon || 'null' %>,<%= @zoom %>);
+ <% end -%>
function setPosition(lat, lon, zoom) {
$("#potlatch").each(function () {
function setPosition(lat, lon, zoom) {
$("#potlatch").each(function () {