Fix the inheritance chain in Geometry.Point. Fixes #551.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2859 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -9,7 +9,7 @@ OpenLayers.Class = {
|
|||||||
|
|
||||||
create: function() {
|
create: function() {
|
||||||
return function() {
|
return function() {
|
||||||
if (arguments && arguments[0] != OpenLayers.Class.isPrototype)
|
if (!arguments || arguments[0] != OpenLayers.Class.isPrototype)
|
||||||
this.initialize.apply(this, arguments);
|
this.initialize.apply(this, arguments);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
*/
|
*/
|
||||||
OpenLayers.Geometry.Point = OpenLayers.Class.create();
|
OpenLayers.Geometry.Point = OpenLayers.Class.create();
|
||||||
OpenLayers.Geometry.Point.prototype =
|
OpenLayers.Geometry.Point.prototype =
|
||||||
OpenLayers.Class.inherit(OpenLayers.LonLat, OpenLayers.Geometry, {
|
OpenLayers.Class.inherit(OpenLayers.Geometry, OpenLayers.LonLat, {
|
||||||
|
|
||||||
/** @type float */
|
/** @type float */
|
||||||
x: null,
|
x: null,
|
||||||
@@ -33,8 +33,8 @@ OpenLayers.Geometry.Point.prototype =
|
|||||||
* @param {float} y
|
* @param {float} y
|
||||||
*/
|
*/
|
||||||
initialize: function(x, y) {
|
initialize: function(x, y) {
|
||||||
OpenLayers.LonLat.prototype.initialize.apply(this, arguments);
|
|
||||||
OpenLayers.Geometry.prototype.initialize.apply(this, arguments);
|
OpenLayers.Geometry.prototype.initialize.apply(this, arguments);
|
||||||
|
OpenLayers.LonLat.prototype.initialize.apply(this, arguments);
|
||||||
|
|
||||||
this.x = this.lon;
|
this.x = this.lon;
|
||||||
this.y = this.lat;
|
this.y = this.lat;
|
||||||
|
|||||||
Reference in New Issue
Block a user