From 938694f527bd590457385de32a7221321c207356 Mon Sep 17 00:00:00 2001
From: anonymous <anonymous>
Date: Wed, 23 Jan 2019 13:29:36 +0100
Subject: [PATCH] undo restet layout fix

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

diff --git a/ckanext/odsh/fanstatic/odsh_spatial_query.js b/ckanext/odsh/fanstatic/odsh_spatial_query.js
index 7c01944c..70586e61 100644
--- a/ckanext/odsh/fanstatic/odsh_spatial_query.js
+++ b/ckanext/odsh/fanstatic/odsh_spatial_query.js
@@ -137,7 +137,7 @@ this.ckan.module('odsh-spatial-query', function ($, _)
           rectangle: { shapeOptions: module.options.style }
         }
       });
-      L.drawLocal.draw.toolbar.buttons.rectangle='Rechteck ziehen'
+      L.drawLocal.draw.toolbar.buttons.rectangle = 'Rechteck ziehen'
       // Initialize the draw control
       map.addControl(drawControl);
 
@@ -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();
-          }, 0);
+          }, 200);
         }
       });
 
@@ -263,7 +263,7 @@ this.ckan.module('odsh-spatial-query', function ($, _)
         setTimeout(function ()
         {
           form.submit();
-        }, 0);
+        }, 800);
       }
     }
   }
-- 
GitLab