From d2c18d4de7225fc099ae9a653ba3fa3865477224 Mon Sep 17 00:00:00 2001 From: euzuro Date: Mon, 22 May 2006 11:09:27 +0000 Subject: [PATCH] rename 'object' to 'image', coding standards, remove duplicate declaration of 'events' git-svn-id: http://svn.openlayers.org/trunk/openlayers@251 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf --- lib/OpenLayers/Marker.js | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/lib/OpenLayers/Marker.js b/lib/OpenLayers/Marker.js index 472308c3d6..e29a941399 100644 --- a/lib/OpenLayers/Marker.js +++ b/lib/OpenLayers/Marker.js @@ -1,3 +1,6 @@ +/** +* @class +*/ OpenLayers.Marker = Class.create(); OpenLayers.Marker.prototype = { @@ -12,30 +15,30 @@ OpenLayers.Marker.prototype = { * @type Object */ data: null, - /** @type */ + /** @type OpenLayers.Events*/ events: null, /** @type OpenLayers.Map */ map: null, - object: null, - - events:null, + /** @type DOMElement */ + image: null, /** + * @constructor + * * @param {OpenLayers.Icon} icon * @param {OpenLayers.LonLat lonlat */ initialize: function(lonlat, icon) { this.icon = icon; this.lonlat = lonlat; - this.object = OpenLayers.Util.createImage( - this.icon.url, - this.icon.size, - null, - "absolute" - ); - this.events = new OpenLayers.Events(this, this.object, null); + this.image = OpenLayers.Util.createImage(this.icon.url, + this.icon.size, + null, + "absolute" + ); + this.events = new OpenLayers.Events(this, this.image, null); }, /** @@ -46,9 +49,9 @@ OpenLayers.Marker.prototype = { * @type DOMElement */ draw: function(pixel) { - this.object.style.top = (pixel.y + this.icon.offset.y) + "px" - this.object.style.left = (pixel.x + this.icon.offset.x) + "px"; - return this.object; + this.image.style.top = (pixel.y + this.icon.offset.y) + "px" + this.image.style.left = (pixel.x + this.icon.offset.x) + "px"; + return this.image; }, /** @final @type String */