added loader to hide ugly loading/repositioning etc.

This commit is contained in:
azivner
2017-11-06 20:13:36 -05:00
parent a73afa9ded
commit 0869caa03c
3 changed files with 21 additions and 3 deletions

View File

@@ -89,4 +89,18 @@ $(document).tooltip({
function isElectron() {
return window && window.process && window.process.type;
}
}
$(document).ready(() => {
$("#container").show();
// Get a reference to the loader's div
const loaderDiv = document.getElementById("loader-wrapper");
// When the transition ends remove loader's div from display
// so that we can access the map with gestures or clicks
loaderDiv.addEventListener("transitionend", function(){
loaderDiv.style.display = "none";
}, true);
// Kick off the CSS transition
loaderDiv.style.opacity = 0.0;
});