]> git.openstreetmap.org Git - rails.git/blobdiff - app/assets/javascripts/leaflet.sidebar.js
Refactor URL generating methods
[rails.git] / app / assets / javascripts / leaflet.sidebar.js
index 961842668f25432a3c4905e8df6f8b9a3163fc58..8c4dee308ada2bb36068aaf2f7fe430a9501279c 100644 (file)
@@ -28,11 +28,11 @@ L.OSM.sidebar = function(selector) {
       current = pane;
     }
 
+    map.invalidateSize({pan: false, animate: false});
+
     current
       .show()
       .trigger('show');
-
-    map.invalidateSize({pan: false, animate: false});
   };
 
   return control;