[Mapbender-commits] r2397 - branches/2.5/http/javascripts

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Mon Apr 21 06:12:46 EDT 2008


Author: sven
Date: 2008-04-21 06:12:46 -0400 (Mon, 21 Apr 2008)
New Revision: 2397

Modified:
   branches/2.5/http/javascripts/geometry.js
Log:
Highlight:
- new method hide()
- new method setDiameter()

Modified: branches/2.5/http/javascripts/geometry.js
===================================================================
--- branches/2.5/http/javascripts/geometry.js	2008-04-21 08:03:03 UTC (rev 2396)
+++ branches/2.5/http/javascripts/geometry.js	2008-04-21 10:12:46 UTC (rev 2397)
@@ -1377,6 +1377,12 @@
 		else {gA.get(-1).color = lineColor;}
 	};
 	
+	this.hide = function () {
+		for (var i=0; i < canvas.length; i++) {
+			if (typeof(canvas[i]) == "object") {canvas[i].clean();}
+		}
+	};
+
 	/**
 	 * removes all MultiGeometries.
 	 *
@@ -1393,6 +1399,7 @@
 	 *
 	 */	
 	this.paint = function() {
+		this.hide();
 		for (var i=0; i < canvas.length; i++) {
 			if (typeof(canvas[i]) == "object") {canvas[i].clean();}
 		}
@@ -1404,6 +1411,14 @@
 		}
 	};
 
+	this.setDiameter = function (radius) {
+		for (var i = 0; i < targets.length; i++) {
+			if (typeof(canvas[i]) != "undefined") {
+				canvas[i].setDiameter(radius);
+			}
+		}
+	}
+
 	this.setMouseOver = function (callback) {
 		for (var i=0; i<targets.length; i++){
 			if (typeof(canvas[i]) !== 'undefined') {



More information about the Mapbender_commits mailing list