Eliminate loading flash for welcome overlay

This commit is contained in:
John Firebaugh 2013-11-19 11:18:11 -08:00
parent e91956d0f7
commit bd21a1f7ff
5 changed files with 24 additions and 17 deletions

View file

@ -198,22 +198,19 @@ $(document).ready(function () {
OSM.Index = function(map) {
var page = {};
page.pushstate = function(path) {
page.pushstate = function() {
$("#content").addClass("overlay-sidebar");
map.invalidateSize({pan: false})
.panBy([-350, 0], {animate: false});
OSM.loadSidebarContent(path);
page.load();
};
page.load = function() {
return map.getState();
};
page.popstate = function(path) {
page.popstate = function() {
$("#content").addClass("overlay-sidebar");
map.invalidateSize({pan: false});
OSM.loadSidebarContent(path);
};
page.unload = function() {

View file

@ -649,12 +649,22 @@ nav.secondary {
}
}
.welcome {
display: none;
}
.overlay-sidebar #sidebar {
position: absolute;
z-index: 1000;
height: auto;
border-bottom-right-radius: 5px;
overflow: hidden;
.welcome {
display: block;
}
#sidebar_content {
display: none;
}
}
.welcome {

View file

@ -122,7 +122,7 @@ nav.secondary {
}
#sidebar .welcome {
display: none;
display: none !important;
}
.leaflet-top.leaflet-right {