When asked to edit an object centre on the correct location
This commit is contained in:
parent
60363a4c36
commit
a693fc9a3c
1 changed files with 8 additions and 0 deletions
|
@ -60,7 +60,15 @@
|
|||
// 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 %>);
|
||||
<% end -%>
|
||||
|
||||
function setPosition(lat, lon, zoom) {
|
||||
$("#potlatch").each(function () {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue