Make setPosition reposition Potlatch 2 instead of reloading it
authorTom Hughes <tom@compton.nu>
Tue, 30 Nov 2010 17:18:16 +0000 (17:18 +0000)
committerTom Hughes <tom@compton.nu>
Tue, 30 Nov 2010 17:18:16 +0000 (17:18 +0000)
app/views/site/_potlatch2.html.erb

index d2358f05e0afd291632060032836d8e695c17e47..8256540298f6d8f0c8b104f32c23742a4042e9e2 100644 (file)
@@ -43,6 +43,6 @@
   doSWF(<%= @lat || 'null' %>,<%= @lon || 'null' %>,<%= @zoom %>);
 
   function setPosition(lat, lon, zoom) {
-    doSWF(lat, lon, zoom || 15);
+    $("potlatch").setPosition(lat, lon, Math.max(zoom || 15, 13));
   }
 </script>