From 9256cdc2074bbbb49958351bf8baf885bf151a4b Mon Sep 17 00:00:00 2001 From: crschmidt Date: Sat, 27 May 2006 13:09:10 +0000 Subject: [PATCH] Return popup when created. If we don'tn get an offset, leave it null: let OL.Icon calculate it. fix typo in case. git-svn-id: http://svn.openlayers.org/trunk/openlayers@422 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf --- lib/OpenLayers/Feature.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/OpenLayers/Feature.js b/lib/OpenLayers/Feature.js index bc1ac7126c..e70b63a6cf 100644 --- a/lib/OpenLayers/Feature.js +++ b/lib/OpenLayers/Feature.js @@ -40,7 +40,7 @@ OpenLayers.Feature.prototype= { this.layer = layer; this.lonlat = lonlat; this.data = data; - this.id = (id ? id : 'f'+Math.Random()); + this.id = (id ? id : 'f'+Math.random()); }, /** @@ -65,9 +65,8 @@ OpenLayers.Feature.prototype= { var imgSize = (this.data.iconSize) ? this.data.iconSize : new OpenLayers.Size(25, 25); - var imgOffset = (this.data.iconOffset) ? this.data.iconOffset - : new OpenLayers.Pixel(0,0); + : null; this.icon = new OpenLayers.Icon(imgURL, imgSize, imgOffset); @@ -95,7 +94,7 @@ OpenLayers.Feature.prototype= { this.data.popupContentHTML, anchorSize); } - + return this.popup; }, CLASS_NAME: "OpenLayers.Feature"