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:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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"
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user