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

View File

@@ -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 */