]> git.openstreetmap.org Git - rails.git/blobdiff - app/assets/javascripts/index.js
Localisation updates from https://translatewiki.net.
[rails.git] / app / assets / javascripts / index.js
index ccf4e561c98ceacd14d0e612f77e408fc6bac734..d1527207ff6bd7a7e2a16b1cd3fea3a702d9ecc5 100644 (file)
 $(document).ready(function () {
   var loaderTimeout;
 
+  var map = new L.OSM.Map("map", {
+    zoomControl: false,
+    layerControl: false,
+    contextmenu: true
+  });
+
   OSM.loadSidebarContent = function(path, callback) {
     map.setSidebarOverlaid(false);
 
@@ -78,12 +84,6 @@ $(document).ready(function () {
 
   var params = OSM.mapParams();
 
-  var map = new L.OSM.Map("map", {
-    zoomControl: false,
-    layerControl: false,
-    contextmenu: true
-  });
-
   map.attributionControl.setPrefix('');
 
   map.updateLayers(params.layers);
@@ -187,12 +187,12 @@ $(document).ready(function () {
     $.cookie('_osm_location', OSM.locationCookie(map), { expires: expiry, path: '/' });
   });
 
-  if ($.cookie('_osm_welcome') === 'hide') {
-    $('.welcome').hide();
+  if ($.cookie('_osm_welcome') !== 'hide') {
+    $('.welcome').addClass('visible');
   }
 
   $('.welcome .close-wrap').on('click', function() {
-    $('.welcome').hide();
+    $('.welcome').removeClass('visible');
     $.cookie('_osm_welcome', 'hide', { expires: expiry, path: '/' });
   });