[Mapbender-commits] r3388 - trunk/mapbender/http/javascripts
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Fri Jan 2 08:15:26 EST 2009
Author: christoph
Date: 2009-01-02 08:15:26 -0500 (Fri, 02 Jan 2009)
New Revision: 3388
Modified:
trunk/mapbender/http/javascripts/mod_scalebar.php
Log:
http://trac.osgeo.org/mapbender/ticket/360
Modified: trunk/mapbender/http/javascripts/mod_scalebar.php
===================================================================
--- trunk/mapbender/http/javascripts/mod_scalebar.php 2009-01-02 13:15:23 UTC (rev 3387)
+++ trunk/mapbender/http/javascripts/mod_scalebar.php 2009-01-02 13:15:26 UTC (rev 3388)
@@ -85,6 +85,25 @@
scalebarTag += "<div style='position:absolute;left:"+(img_width + 2)+"px;top:7px;color:"+mod_scalebar_color1+";font-family:"+mod_scalebar_font+";font-size:"+mod_scalebar_fontsize+";'><nobr>"+ unit+"</nobr></div>";
scalebarTag += "<div style='position:absolute;left:"+(img_width + 2)+"px;top:5px;color:"+mod_scalebar_color1+";font-family:"+mod_scalebar_font+";font-size:"+mod_scalebar_fontsize+";'><nobr>"+ unit+"</nobr></div>";
scalebarTag += "<div style='position:absolute;left:"+(img_width + 3)+"px;top:6px;color:"+mod_scalebar_color2+";font-family:"+mod_scalebar_font+";font-size:"+mod_scalebar_fontsize+";'>"+ unit+"</div>";
- mb_arrangeElement(mod_scalebar_target, "scalebar", mod_scalebar_left, (mb_mapObj[ind].height - mod_scalebar_bottom));
- writeTag(mod_scalebar_target, "scalebar", scalebarTag);
+
+ var map_el = mb_mapObj[ind].getDomElement();
+ if(!map_el.ownerDocument.getElementById(mb_mapObj[ind].elementName+"_scalebar")){
+ //create Box Elements
+ el_top = map_el.ownerDocument.createElement("div");
+ el_top.style.position = "absolute";
+ el_top.style.top = "0px";
+ el_top.style.left = "0px";
+ el_top.style.width = "0px";
+ el_top.style.height = "0px";
+ el_top.style.overflow = "hidden";
+ el_top.style.zIndex = "10";
+ el_top.style.visibility = "hidden";
+ el_top.style.cursor = "crosshair";
+ el_top.style.backgroundColor = "#ff0000";
+ el_top.id = mb_mapObj[ind].elementName+"_scalebar";
+ map_el.appendChild(el_top);
+ }
+ mb_arrangeElement("", mod_scalebar_target+"_scalebar", mod_scalebar_left, (mb_mapObj[ind].height - mod_scalebar_bottom));
+ writeTag(mb_mapObj[ind].frameName, mb_mapObj[ind].elementName+"_scalebar", scalebarTag);
+
}
\ No newline at end of file
More information about the Mapbender_commits
mailing list