[Mapbender-commits] r2770 - in trunk/mapbender: http/javascripts lib

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Tue Aug 12 03:51:04 EDT 2008


Author: christoph
Date: 2008-08-12 03:51:04 -0400 (Tue, 12 Aug 2008)
New Revision: 2770

Modified:
   trunk/mapbender/http/javascripts/geometry.js
   trunk/mapbender/http/javascripts/mod_digitize_tab.php
   trunk/mapbender/http/javascripts/mod_dragMapSize.php
   trunk/mapbender/http/javascripts/mod_tab.js
   trunk/mapbender/lib/core.js
Log:
bug fixes, merged from 2.5 branch

http://trac.osgeo.org/mapbender/ticket/263
http://trac.osgeo.org/mapbender/ticket/259

Modified: trunk/mapbender/http/javascripts/geometry.js
===================================================================
--- trunk/mapbender/http/javascripts/geometry.js	2008-08-11 15:37:31 UTC (rev 2769)
+++ trunk/mapbender/http/javascripts/geometry.js	2008-08-12 07:51:04 UTC (rev 2770)
@@ -1314,6 +1314,10 @@
 	var mapObjInd = getMapObjIndexByName(mapframe);
 	var mapframeWidth = mb_mapObj[mapObjInd].width;
 	var mapframeHeight = mb_mapObj[mapObjInd].height;
+	eventResizeMap.register(function () {
+		mapframeWidth = mb_mapObj[mapObjInd].width;
+		mapframeHeight = mb_mapObj[mapObjInd].height;
+	});
 	var style = aStyle;
 	var canvas = new jsGraphics(aTagName, window.frames[mapframe]);
 	canvas.setStroke(lineWidth);

Modified: trunk/mapbender/http/javascripts/mod_digitize_tab.php
===================================================================
--- trunk/mapbender/http/javascripts/mod_digitize_tab.php	2008-08-11 15:37:31 UTC (rev 2769)
+++ trunk/mapbender/http/javascripts/mod_digitize_tab.php	2008-08-12 07:51:04 UTC (rev 2770)
@@ -795,8 +795,8 @@
 					var currentPoint = currentGeometry.get(k);
 					var currentPointMap = new Point(Math.round((currentPoint.x - minX)*cx), Math.round((maxY - currentPoint.y)*cy));
 					
-					var isTooCloseToPrevious = lastPaintedPoint && (k > 0) && Math.abs(currentPointMap.x-lastPaintedPoint.x) <= minDist && Math.abs(currentPointMap.y-lastPaintedPoint.y) <= minDist;
-					if (!isTooCloseToPrevious) {
+//					var isTooCloseToPrevious = lastPaintedPoint && (k > 0) && Math.abs(currentPointMap.x-lastPaintedPoint.x) <= minDist && Math.abs(currentPointMap.y-lastPaintedPoint.y) <= minDist;
+//					if (!isTooCloseToPrevious) {
 						var currentPointIsVisible = currentPointMap.x > 0 && currentPointMap.x < width && currentPointMap.y > 0 && currentPointMap.y < height;
 						if (currentPointIsVisible) {
 							if (!isComplete && ((k == 0 && isPolygon) || (k == lenPoint-1 && isLine))) {
@@ -822,7 +822,7 @@
 								smPArray[smPArray.length] = evaluateDashes(points[0], points[1], i, j, k);
 							}
 						}
-					}
+//					}
 					var previousPointMap = currentPointMap;
 				}
 			}

Modified: trunk/mapbender/http/javascripts/mod_dragMapSize.php
===================================================================
--- trunk/mapbender/http/javascripts/mod_dragMapSize.php	2008-08-11 15:37:31 UTC (rev 2769)
+++ trunk/mapbender/http/javascripts/mod_dragMapSize.php	2008-08-12 07:51:04 UTC (rev 2770)
@@ -101,6 +101,7 @@
 	var mybbox = mb_mapObj[ind].extent.split(",");
 	mb_mapObj[ind].extent = mybbox[0] + "," + pos[1] + "," + pos[0] + "," +  mybbox[3];
 	setMapRequest(mod_dragMapSize_target);
+	eventResizeMap.trigger();
 }
 
 function mod_dragMapSize_drag(e){

Modified: trunk/mapbender/http/javascripts/mod_tab.js
===================================================================
--- trunk/mapbender/http/javascripts/mod_tab.js	2008-08-11 15:37:31 UTC (rev 2769)
+++ trunk/mapbender/http/javascripts/mod_tab.js	2008-08-12 07:51:04 UTC (rev 2770)
@@ -233,7 +233,7 @@
 		for (var i = 0; i < this.count(); i++) {
 			for(var j=0; j<obj.length; j++){
 				if (this.get(i).module == obj[j].id) {
-					this.get(i).getNode().innerHTML = obj[j].title;
+					this.get(i).getNode().innerHTML = tabPrefix + obj[j].title;
 				}
 			}
 		}		
@@ -488,9 +488,9 @@
 	var tabHeight = parseInt(rootNode.style.height, 10);
 	var tabStyle = cssString;
 
-	
+	var tabPrefix = tab_prefix || '';
 	var styleObj = new StyleTag();
 	styleObj.addClass("verticalTabs", tabStyle);
 };
 
-VerticalTabArray.prototype = new List();
\ No newline at end of file
+VerticalTabArray.prototype = new List();

Modified: trunk/mapbender/lib/core.js
===================================================================
--- trunk/mapbender/lib/core.js	2008-08-11 15:37:31 UTC (rev 2769)
+++ trunk/mapbender/lib/core.js	2008-08-12 07:51:04 UTC (rev 2770)
@@ -75,6 +75,11 @@
 var eventAfterMapObjectConstruction = new MapbenderEvent(); // possibly obsolete!
 
 /**
+ * Triggered after the map has been resized
+ */
+var eventResizeMap = new MapbenderEvent();
+
+/**
  * deprecated wrapped function
  * @deprecated
  */



More information about the Mapbender_commits mailing list