JSDOC / coding standards for OpenLayers.Icon
git-svn-id: http://svn.openlayers.org/trunk/openlayers@128 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -1,16 +1,27 @@
|
||||
/**
|
||||
* @class
|
||||
*/
|
||||
OpenLayers.Icon = Class.create();
|
||||
OpenLayers.Icon.prototype = {
|
||||
|
||||
// string: image url
|
||||
/** image url
|
||||
* @type String */
|
||||
url: null,
|
||||
|
||||
// {OpenLayers.Size}: size of image
|
||||
/** @type OpenLayers.Size */
|
||||
size:null,
|
||||
|
||||
/** distance in pixels to offset the image when being rendered
|
||||
* @type OpenLayers.Pixel */
|
||||
offset: null,
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
*
|
||||
* @param {String} url
|
||||
* @param {OpenLayers.Size} size
|
||||
* @param {OpenLayers.Pixel} offset
|
||||
*/
|
||||
initialize: function(url, size, offset) {
|
||||
this.size = size;
|
||||
this.url = url;
|
||||
@@ -23,8 +34,14 @@ OpenLayers.Icon.prototype = {
|
||||
|
||||
},
|
||||
|
||||
// Create a copy of this icon.
|
||||
/**
|
||||
* @returns A fresh copy of the icon.
|
||||
* @type OpenLayers.Icon
|
||||
*/
|
||||
clone: function() {
|
||||
return new OpenLayers.Icon(this.size, this.url);
|
||||
}
|
||||
return new OpenLayers.Icon(this.size, this.url, this.offset);
|
||||
},
|
||||
|
||||
/** @final @type String */
|
||||
CLASS_NAME: "OpenLayers.Icon"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user