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
This commit is contained in:
euzuro
2006-05-22 11:09:27 +00:00
parent 144da2ba73
commit d2c18d4de7
+17 -14
View File
@@ -1,3 +1,6 @@
/**
* @class
*/
OpenLayers.Marker = Class.create(); OpenLayers.Marker = Class.create();
OpenLayers.Marker.prototype = { OpenLayers.Marker.prototype = {
@@ -12,30 +15,30 @@ OpenLayers.Marker.prototype = {
* @type Object */ * @type Object */
data: null, data: null,
/** @type */ /** @type OpenLayers.Events*/
events: null, events: null,
/** @type OpenLayers.Map */ /** @type OpenLayers.Map */
map: null, map: null,
object: null, /** @type DOMElement */
image: null,
events:null,
/** /**
* @constructor
*
* @param {OpenLayers.Icon} icon * @param {OpenLayers.Icon} icon
* @param {OpenLayers.LonLat lonlat * @param {OpenLayers.LonLat lonlat
*/ */
initialize: function(lonlat, icon) { initialize: function(lonlat, icon) {
this.icon = icon; this.icon = icon;
this.lonlat = lonlat; this.lonlat = lonlat;
this.object = OpenLayers.Util.createImage( this.image = OpenLayers.Util.createImage(this.icon.url,
this.icon.url, this.icon.size,
this.icon.size, null,
null, "absolute"
"absolute" );
); this.events = new OpenLayers.Events(this, this.image, null);
this.events = new OpenLayers.Events(this, this.object, null);
}, },
/** /**
@@ -46,9 +49,9 @@ OpenLayers.Marker.prototype = {
* @type DOMElement * @type DOMElement
*/ */
draw: function(pixel) { draw: function(pixel) {
this.object.style.top = (pixel.y + this.icon.offset.y) + "px" this.image.style.top = (pixel.y + this.icon.offset.y) + "px"
this.object.style.left = (pixel.x + this.icon.offset.x) + "px"; this.image.style.left = (pixel.x + this.icon.offset.x) + "px";
return this.object; return this.image;
}, },
/** @final @type String */ /** @final @type String */