take toString away from Geometry.LineString and Geometry.LinearRing, give it to Geometry.Collection, and make sure the IE hack doesn't clobber toString during inheritance - see #552 and #565

git-svn-id: http://svn.openlayers.org/trunk/openlayers@2901 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
Tim Schaub
2007-03-26 23:06:54 +00:00
parent 09bef10687
commit 7218fe6ea8
4 changed files with 10 additions and 18 deletions

View File

@@ -32,7 +32,7 @@ OpenLayers.Class = {
//
// to be revisited in 3.0
//
if (arguments[i].toString) {
if (arguments[i].hasOwnProperty('toString')) {
proto.toString = arguments[i].toString;
}
}

View File

@@ -46,6 +46,15 @@ OpenLayers.Geometry.Collection.prototype =
this.components = null;
},
/**
* @returns The coordinates components as a string
* @type String
*/
toString: function() {
return this.components.toString();
},
/**
* @returns An exact clone of this collection
* @type OpenLayers.Geometry.Collection

View File

@@ -24,14 +24,6 @@ OpenLayers.Geometry.LineString.prototype =
arguments);
},
/**
* @returns The coordinates components as a string
* @type String
*/
toString: function() {
return this.components.toString();
},
/**
* @returns An exact clone of this OpenLayers.Feature
* @type OpenLayers.Feature

View File

@@ -108,15 +108,6 @@ OpenLayers.Geometry.LinearRing.prototype =
return area;
},
/**
* @returns The coordinates components as a string
* @type String
*/
toString: function() {
return this.components.toString();
},
/** @final @type String */
CLASS_NAME: "OpenLayers.Geometry.LinearRing"
});