load grid then show it

This commit is contained in:
Sublunar Space 2022-09-19 18:26:59 +02:00
parent db179791a6
commit 5be92fcf28

View file

@ -169,7 +169,7 @@ SL.Calendar = (function() {
// checks if usecase is online, then uses server based calculation // checks if usecase is online, then uses server based calculation
} else { } else {
var url = "https://almanac.sublunar.space/pmom.php?days="+days+"&ts="+ts+"&lat="+lat+"&lon="+lon; var url = "https://almanac.sublunar.space/pmom.php?days="+days+"&ts="+ts+"&lat="+lat+"&lon="+lon;
fetch(url) fetch('pmom.json')
.then(function(response) { .then(function(response) {
return response.json(); return response.json();
}) })
@ -209,6 +209,7 @@ SL.Calendar = (function() {
} }
if ( Hours.moments.length > 0 ) { if ( Hours.moments.length > 0 ) {
$('#caption .stoke').html('generating planetary hours...please wait'); $('#caption .stoke').html('generating planetary hours...please wait');
$('#grid').hide();
for (var i = 0, len = Hours.moments.length; i < len; i++) { for (var i = 0, len = Hours.moments.length; i < len; i++) {
var everyday = setTimeout( Hour.make, 10, Hours.moments[i], i, Hours.moments.length, everyday); var everyday = setTimeout( Hour.make, 10, Hours.moments[i], i, Hours.moments.length, everyday);
NProgress.set(i/Hours.moments.length); NProgress.set(i/Hours.moments.length);
@ -285,6 +286,7 @@ SL.Calendar = (function() {
if ( $("#relevance").is(':checked') ) { if ( $("#relevance").is(':checked') ) {
Filter.displayRelevantOperations(); Filter.displayRelevantOperations();
} }
$('#grid').show();
} }
} }