add more debug comments around image loading
authorRobert Kaiser <robert@widebook.box.kairo.at>
Sat, 26 Apr 2014 13:24:47 +0000 (15:24 +0200)
committerRobert Kaiser <robert@widebook.box.kairo.at>
Sat, 26 Apr 2014 13:24:47 +0000 (15:24 +0200)
js/map.js

index 024eaf4e655b9a9f34df5e227070bfc87678b716..b734113d1cec49c88f95ed76bf2bb60ac36a20a3 100644 (file)
--- a/js/map.js
+++ b/js/map.js
@@ -125,13 +125,15 @@ function loadPrefs(aEvent) {
       document.getElementById("copyright").innerHTML =
           gMapStyles[gMap.activeMap].copyright;
 
+      console.log("Init loading tile...");
       gLoadingTile = new Image();
-      gLoadingTile.src = "style/loading.png";
       gLoadingTile.onload = function() {
-        console.log("Loading Tile loaded.");
+        console.log("Loading tile loaded.");
         var throwEv = new CustomEvent("prefload-done");
         gAction.dispatchEvent(throwEv);
       };
+      console.log("Set loading tile...");
+      gLoadingTile.src = "style/loading.png";
     }
   }
   else {