svn commit: r578 - trunk/mapbender/http/javascripts/mod_digitize_tab.php

christoph at osgeo.org christoph at osgeo.org
Tue Jun 20 06:58:59 EDT 2006


Author: christoph
Date: 2006-06-20 10:58:59+0000
New Revision: 578

Modified:
   trunk/mapbender/http/javascripts/mod_digitize_tab.php

Log:
2 bugfixes:

- fixed positions of buttons in IE
- added missing '>' of linepoint tag

Modified: trunk/mapbender/http/javascripts/mod_digitize_tab.php
Url: https://mapbender.osgeo.org/source/browse/mapbender/trunk/mapbender/http/javascripts/mod_digitize_tab.php?view=diff&rev=578&p1=trunk/mapbender/http/javascripts/mod_digitize_tab.php&p2=trunk/mapbender/http/javascripts/mod_digitize_tab.php&r1=577&r2=578
==============================================================================
--- trunk/mapbender/http/javascripts/mod_digitize_tab.php	(original)
+++ trunk/mapbender/http/javascripts/mod_digitize_tab.php	2006-06-20 10:58:59+0000
@@ -92,7 +92,7 @@
 function mod_digitize_go(e){
 	parent.mb_registerGML(mod_digitize_target,d);   
 
-	executeDigitizePreFunctions();
+	//executeDigitizePreFunctions();
 	
 	// ie workaround
 	if (e == undefined) {
@@ -374,17 +374,22 @@
 //	try {if(geomList_x){}}catch(e) {var geomList_x = 10;}
 //	try {if(geomList_y){}}catch(e) {var geomList_y = 10;}
 //	try {if(buttonDig_id.length){}}catch(e) {var buttonDig_id = new Array();alert("exception: no digitisation buttons found in element vars.")}
-	document.getElementById("listOfGeometries").setAttribute("style", "position:absolute; top:"+geomList_y+"; left:"+geomList_x+";");
 	for (var i = 0 ; i < buttonDig_id.length ; i ++) {
 		if (parseInt(buttonDig_on[i])==1) {
 			var divTag = document.createElement("div");
 			divTag.setAttribute("id", "div_" + buttonDig_id[i]);
-			divTag.setAttribute("style", "position:absolute; top:"+buttonDig_y[i]+"; left:"+buttonDig_x[i]+";");
+// FIREFOX 
+//			divTag.setAttribute("style", "position:absolute; top:"+buttonDig_y[i]+"px; left:"+buttonDig_x[i]+"px;", 0);
+//			var tagContent = "<img name=\""+buttonDig_id[i]+"\" onmouseover=\"parent.mb_regButton_frame('initDigButton', mod_digitize_elName, "+i+");\" id=\""+buttonDig_id[i]+"\" title=\""+buttonDig_title_off[i]+"\" src=\""+buttonDig_imgdir+buttonDig_src[i]+"\">";
+
 			document.getElementById("digButtons").appendChild(divTag);
-			var tagContent = "<img name=\""+buttonDig_id[i]+"\" onmouseover=\"parent.mb_regButton_frame('initDigButton', mod_digitize_elName, "+i+");\" id=\""+buttonDig_id[i]+"\" title=\""+buttonDig_title_off[i]+"\" src=\""+buttonDig_imgdir+buttonDig_src[i]+"\">"; 
+
+//IE WORKAROUND, WORKS ALSO FOR FIREFOX
+			var tagContent = "<div style='position:absolute; top:"+buttonDig_y[i]+"px; left:"+buttonDig_x[i]+"px;'><img name=\""+buttonDig_id[i]+"\" onmouseover=\"parent.mb_regButton_frame('initDigButton', mod_digitize_elName, "+i+");\" id=\""+buttonDig_id[i]+"\" title=\""+buttonDig_title_off[i]+"\" src=\""+buttonDig_imgdir+buttonDig_src[i]+"\"></div>";
 			parent.writeTag(mod_digitize_elName,"div_" + buttonDig_id[i],tagContent);
 		}
 	}
+//	document.getElementById("listOfGeometries").setAttribute("style", "position:absolute; top:"+geomList_y+"px; left:"+geomList_x+"px;");
 }
 
 function initDigButton(ind, pos){
@@ -407,8 +412,8 @@
 		executeDigitizePreFunctions();
 	}
 	else if (obj.id == button_point || obj.id == button_line || obj.id == button_polygon){
-		executeDigitizePreFunctions();
 		mod_digitizeEvent = obj.id;
+		executeDigitizePreFunctions();
 		obj.title = obj.title_off;
 		if (obj.id == button_point) {
 			d.addMember(geomTypePoint);
@@ -568,7 +573,6 @@
 }
 
 function drawDashedLine(){
-
 	var smP = "";
 	smP += "<div class='t_img'>";
 	smP += "<img src='"+parent.mb_trans.src+"' width='"+mod_digitize_width+"' height='0'></div>";
@@ -627,16 +631,16 @@
 				str_dashedLine += "<div class='lp' style='top:"+y+"px;left:"+x+"px;z-index:50;' ";
 			}
 			if(mod_digitizeEvent == button_insert) {
-				str_dashedLine += "onmouseover='parent.window.frames[\""+mod_digitize_elName+"\"].convertLinepointToBasepoint(this,"+memberIndex+","+geomIndex+","+pointIndex+")'>";
+				str_dashedLine += "onmouseover='parent.window.frames[\""+mod_digitize_elName+"\"].convertLinepointToBasepoint(this,"+memberIndex+","+geomIndex+","+pointIndex+")'";
 			}
-			str_dashedLine += "</div>";
+			str_dashedLine += "></div>";
 		}
 	}
 	return str_dashedLine;
 }
 
 function updateListOfGeometries(){
-	var listOfGeom = "<table>\n";
+	var listOfGeom = "<table style='position:absolute; top:"+geomList_y+"px; left:"+geomList_x+"px;'>\n";
 	for (var i = 0 ; i < d.count(); i ++) {
 		listOfGeom += "\t<tr>\n\t\t<td>\n";
 		listOfGeom += "\t\t\t<img src = '../img/button_digitize/geomInfo.png' title='"+tooltip_wfs+"' onclick='showWfs("+i+")'>\n";




More information about the Mapbender_commits mailing list