[Mapbender-commits] r2488 - trunk/mapbender/http/javascripts
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Mon Jun 9 10:18:22 EDT 2008
Author: christoph
Date: 2008-06-09 10:18:22 -0400 (Mon, 09 Jun 2008)
New Revision: 2488
Modified:
trunk/mapbender/http/javascripts/mod_sandclock.php
trunk/mapbender/http/javascripts/mod_sandclock2.php
Log:
bug fix
Modified: trunk/mapbender/http/javascripts/mod_sandclock.php
===================================================================
--- trunk/mapbender/http/javascripts/mod_sandclock.php 2008-06-09 13:05:37 UTC (rev 2487)
+++ trunk/mapbender/http/javascripts/mod_sandclock.php 2008-06-09 14:18:22 UTC (rev 2488)
@@ -31,17 +31,27 @@
var mod_sandclock_img = new Image();
mod_sandclock_img.src = mod_sandclock_image;
-mb_registerSubFunctions("mod_sandclock(true,myMapId)");
+mb_registerSubFunctions("mod_sandclock(true,myMapIds)");
-function mod_sandclock(start,myMapId){
+function mod_sandclock(start,myMapIds){
var ind = getMapObjIndexByName(mod_sandclock_target);
if(start){
var temp = "<img src='"+mod_sandclock_img.src+"'>";
writeTag(mod_sandclock_target, "sandclock", temp);
mb_arrangeElement(mod_sandclock_target, "sandclock", (mb_mapObj[ind].width/2 - 16), (mb_mapObj[ind].height/2 - 16));
}
- aktiv = setTimeout("mod_sandclock('','"+myMapId+"')",100);
- if(window.frames[mod_sandclock_target].document.getElementById(myMapId) && window.frames[mod_sandclock_target].document.getElementById(myMapId).complete){
+ aktiv = setTimeout("mod_sandclock('','"+myMapIds+"')",10);
+ var myMapIdArray = myMapIds.split(",");
+ var complete = true;
+ var myMapId;
+ for (var i = 0; i < myMapIdArray.length && complete; i++) {
+ myMapId = myMapIdArray[i];
+ if(window.frames[mod_sandclock_target].document.getElementById(myMapId) &&
+ !window.frames[mod_sandclock_target].document.getElementById(myMapId).complete) {
+ complete = false;
+ }
+ }
+ if (complete) {
clearTimeout(aktiv);
writeTag(mod_sandclock_target, "sandclock", "");
}
Modified: trunk/mapbender/http/javascripts/mod_sandclock2.php
===================================================================
--- trunk/mapbender/http/javascripts/mod_sandclock2.php 2008-06-09 13:05:37 UTC (rev 2487)
+++ trunk/mapbender/http/javascripts/mod_sandclock2.php 2008-06-09 14:18:22 UTC (rev 2488)
@@ -29,7 +29,7 @@
mb_registerSubFunctions("mod_sandclock(true,myMapId)");
-function mod_sandclock(start,myMapId){
+function mod_sandclock(start){
var ind = getMapObjIndexByName(mod_sandclock_target);
if(start){
mod_sandclock_count = mod_sandclock_maxWait;
@@ -44,7 +44,7 @@
}
// check images:
- aktiv = setTimeout("mod_sandclock('','"+myMapId+"')",100);
+ aktiv = setTimeout("mod_sandclock(false)",100);
mod_sandclock_count -= 1000;
var allMaps = window.frames[mod_sandclock_target].document.getElementsByName("mapimage");
More information about the Mapbender_commits
mailing list