X-Git-Url: https://git.openstreetmap.org./nominatim-ui.git/blobdiff_plain/76e3136f32e35ded2caf989b0bf699de64798921..c636646759d9c541f7baf19812be18d002a8ce1d:/src/components/SearchBar.svelte

diff --git a/src/components/SearchBar.svelte b/src/components/SearchBar.svelte
index b32907d..879eacd 100644
--- a/src/components/SearchBar.svelte
+++ b/src/components/SearchBar.svelte
@@ -31,8 +31,8 @@
   }
 
   function set_viewbox(map) {
-    let set_viewbox = document.getElementById('use_viewbox');
-    if (set_viewbox && set_viewbox.checked) {
+    let use_viewbox = document.getElementById('use_viewbox');
+    if (use_viewbox && use_viewbox.checked) {
       sViewBox = map_viewbox_as_string(map);
     } else {
       sViewBox = '';
@@ -43,21 +43,22 @@
     let link = document.getElementById('switch-to-reverse');
     if (link) {
       let center_lat_lng = map.wrapLatLng(map.getCenter());
-      link.href = 'reverse.html?lat=' + center_lat_lng.lat.toFixed(5) + '&lon=' + center_lat_lng.lng.toFixed(5);
+      link.href = 'reverse.html?lat=' + center_lat_lng.lat.toFixed(5)
+                   + '&lon=' + center_lat_lng.lng.toFixed(5);
     }
   }
 
   map_store.subscribe(map => {
-    if(!map) { return; }
+    if (!map) { return; }
 
     map.on('move', function () {
       set_viewbox(map);
-      update_reverse_link(map) 
+      update_reverse_link(map);
     });
 
     map.on('load', function () {
       set_viewbox(map);
-      update_reverse_link(map) 
+      update_reverse_link(map);
     });
 
     map.on('click', function (e) {
@@ -71,7 +72,7 @@
 
   function reset_viewbox() {
     let map = get(map_store);
-    if (map) { set_viewbox(map) };
+    if (map) { set_viewbox(map); }
   }
 
   function set_bounded(e) {
@@ -83,8 +84,8 @@
     document.querySelector('input[name=dedupe]').value = e.target.checked ? 1 : '';
   }
 
-  function set_api_param(e){
-    document.querySelector('input[name=' + e.target.dataset['apiParam'] + ']').value = e.target.value;
+  function set_api_param(e) {
+    document.querySelector('input[name=' + e.target.dataset.apiParam + ']').value = e.target.value;
   }
 
   function handleSwitchCoords() {
