[Mapbender-commits] r1312 - trunk/mapbender/http/javascripts
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Wed May 9 09:03:19 EDT 2007
Author: christoph
Date: 2007-05-09 09:03:19 -0400 (Wed, 09 May 2007)
New Revision: 1312
Modified:
trunk/mapbender/http/javascripts/geometry.js
Log:
removed duplicate function cloneObject
Modified: trunk/mapbender/http/javascripts/geometry.js
===================================================================
--- trunk/mapbender/http/javascripts/geometry.js 2007-05-09 13:01:04 UTC (rev 1311)
+++ trunk/mapbender/http/javascripts/geometry.js 2007-05-09 13:03:19 UTC (rev 1312)
@@ -1040,19 +1040,37 @@
mG.get(-1).addPoint(center);
highlight.add(mG);
};
- this.getTolerance = function() {return tolerance;};
- this.getTarget = function() {return target;};
- this.cleanHighlight = function() {return highlight.clean();};
- this.addPoint = function(aPoint) {coord.push(aPoint);};
- this.getPointCount = function() {return coord.length;};
- this.getPoint = function(i) {return coord[i];};
- this.resetPoints = function() {coord = [];};
+ this.getTolerance = function() {
+ return tolerance;
+ };
+ this.getTarget = function() {
+ return target;
+ };
+ this.cleanHighlight = function() {
+ return highlight.clean();
+ };
+ this.addPoint = function(aPoint) {
+ coord.push(aPoint);
+ };
+ this.getPointCount = function() {
+ return coord.length;
+ };
+ this.getPoint = function(i) {
+ return coord[i];
+ };
+ this.resetPoints = function() {
+ coord = [];
+ };
this.getNearestNeighbour = function(){
if (min_i != -1) {return this.getPoint(min_i);}
return false;
};
- this.setIndexOfNearestNeighbour = function(i){min_i = i;};
- this.resetIndexOfNearestNeighbour = function(){min_i = -1;};
+ this.setIndexOfNearestNeighbour = function(i){
+ min_i = i;
+ };
+ this.resetIndexOfNearestNeighbour = function(){
+ min_i = -1;
+ };
var tolerance = (typeof(aTolerance) == 'undefined') ? 10 : aTolerance;
var zIndex = (typeof(aZIndex) == 'undefined') ? 50 : aZIndex;
@@ -1214,14 +1232,3 @@
}
return z;
}
-
-function cloneObject(a){
- var z = [];
-
- for (attr in a) {
- var b = a[attr];
- if (typeof(b) == "object") {z[attr] = cloneObject(b);}
- else {z[attr] = b;}
- }
- return z;
-}
\ No newline at end of file
More information about the Mapbender_commits
mailing list