From 185d10f211eead4ba8e1974cdf472a08c9982128 Mon Sep 17 00:00:00 2001 From: Schuyler Erle Date: Thu, 22 Mar 2007 20:35:16 +0000 Subject: [PATCH] Fix the inheritance chain in Geometry.Point. Fixes #551. git-svn-id: http://svn.openlayers.org/trunk/openlayers@2859 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf --- lib/OpenLayers/BaseTypes.js | 2 +- lib/OpenLayers/Geometry/Point.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/OpenLayers/BaseTypes.js b/lib/OpenLayers/BaseTypes.js index c09f531bd9..02e21c8ab5 100644 --- a/lib/OpenLayers/BaseTypes.js +++ b/lib/OpenLayers/BaseTypes.js @@ -9,7 +9,7 @@ OpenLayers.Class = { create: function() { return function() { - if (arguments && arguments[0] != OpenLayers.Class.isPrototype) + if (!arguments || arguments[0] != OpenLayers.Class.isPrototype) this.initialize.apply(this, arguments); } }, diff --git a/lib/OpenLayers/Geometry/Point.js b/lib/OpenLayers/Geometry/Point.js index e57fcb1f09..b3b1344835 100644 --- a/lib/OpenLayers/Geometry/Point.js +++ b/lib/OpenLayers/Geometry/Point.js @@ -18,7 +18,7 @@ */ OpenLayers.Geometry.Point = OpenLayers.Class.create(); OpenLayers.Geometry.Point.prototype = - OpenLayers.Class.inherit(OpenLayers.LonLat, OpenLayers.Geometry, { + OpenLayers.Class.inherit(OpenLayers.Geometry, OpenLayers.LonLat, { /** @type float */ x: null, @@ -33,8 +33,8 @@ OpenLayers.Geometry.Point.prototype = * @param {float} y */ initialize: function(x, y) { - OpenLayers.LonLat.prototype.initialize.apply(this, arguments); OpenLayers.Geometry.prototype.initialize.apply(this, arguments); + OpenLayers.LonLat.prototype.initialize.apply(this, arguments); this.x = this.lon; this.y = this.lat;