MAPG-19 show loading gif during loading

This commit is contained in:
bence committed 2020-05-20 15:54:09 +02:00
1 parent 51be16395e
commit f647e77366
3 files changed
+23 -1

No files matched your search

+7
View File
@@ -11,6 +11,10 @@
googleLink: null,
getNewPosition: function () {
Core.panorama.setVisible(false);
document.getElementById('loading').style.visibility = 'visible';
var xhr = new XMLHttpRequest();
xhr.responseType = 'json';
xhr.onreadystatechange = function () {
@@ -31,6 +35,9 @@
return;
}
document.getElementById('loading').style.visibility = 'hidden';
Core.panorama.setVisible(true);
Core.panorama.setPov({ heading: 0, pitch: 0, zoom: 1 });
Core.panorama.setPano(data.location.pano);
},