From 1b4eb70df466c431c4a1d023e85e7043bc760e56 Mon Sep 17 00:00:00 2001
From: anonymous <anonymous>
Date: Wed, 23 Jan 2019 13:22:44 +0100
Subject: [PATCH] remove map reset on form submit

---
 ckanext/odsh/fanstatic/odsh_spatial_query.js | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/ckanext/odsh/fanstatic/odsh_spatial_query.js b/ckanext/odsh/fanstatic/odsh_spatial_query.js
index 152bd6f4..7c01944c 100644
--- a/ckanext/odsh/fanstatic/odsh_spatial_query.js
+++ b/ckanext/odsh/fanstatic/odsh_spatial_query.js
@@ -178,15 +178,15 @@ this.ckan.module('odsh-spatial-query', function ($, _)
       {
         if (extentLayer)
         {
-          $('body').removeClass('dataset-map-expanded');
-          is_exanded = false;
-          resetMap();
-          // Eugh, hacky hack.
+          // $('body').removeClass('dataset-map-expanded');
+          // is_exanded = false;
+          // resetMap();
+          // // Eugh, hacky hack.
           setTimeout(function ()
           {
-            map.fitBounds(extentLayer.getBounds());
+            // map.fitBounds(extentLayer.getBounds());
             submitForm();
-          }, 200);
+          }, 0);
         }
       });
 
@@ -263,7 +263,7 @@ this.ckan.module('odsh-spatial-query', function ($, _)
         setTimeout(function ()
         {
           form.submit();
-        }, 800);
+        }, 0);
       }
     }
   }
-- 
GitLab