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 024eaf4..b734113 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 {