coding standards / JSDOC

git-svn-id: http://svn.openlayers.org/trunk/openlayers@621 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
euzuro
2006-06-20 17:47:26 +00:00
parent 351ebb0d52
commit 4c6b232bd2
+14 -9
View File
@@ -1,11 +1,13 @@
/**
* @class
*/
OpenLayers.Layer = Class.create(); OpenLayers.Layer = Class.create();
OpenLayers.Layer.prototype = { OpenLayers.Layer.prototype = {
// str /** @type String */
name: null, name: null,
// DOMElement /** @type DOMElement */
div: null, div: null,
/** This variable is set in map.addLayer, not within the layer itself /** This variable is set in map.addLayer, not within the layer itself
@@ -13,8 +15,10 @@ OpenLayers.Layer.prototype = {
map: null, map: null,
/** /**
* @param {str} name * @constructor
*/ *
* @param {String} name
*/
initialize: function(name) { initialize: function(name) {
if (arguments.length > 0) { if (arguments.length > 0) {
this.name = name; this.name = name;
@@ -29,7 +33,7 @@ OpenLayers.Layer.prototype = {
/** /**
* Destroy is a destructor: this is to alleviate cyclic references which * Destroy is a destructor: this is to alleviate cyclic references which
* the Javascript garbage cleaner can not take care of on its own. * the Javascript garbage cleaner can not take care of on its own.
*/ */
destroy: function() { destroy: function() {
if (this.map != null) { if (this.map != null) {
this.map.removeLayer(this); this.map.removeLayer(this);
@@ -39,9 +43,9 @@ OpenLayers.Layer.prototype = {
/** /**
* @params {OpenLayers.Bounds} bound * @params {OpenLayers.Bounds} bound
* @params {bool} zoomChanged tells when zoom has changed, as layers have to do some init work in that case. * @params {Boolean} zoomChanged tells when zoom has changed, as layers have to do some init work in that case.
*/ */
moveTo: function (bound,zoomChanged) { moveTo: function (bound, zoomChanged) {
// not implemented here // not implemented here
return; return;
}, },
@@ -54,7 +58,8 @@ OpenLayers.Layer.prototype = {
}, },
/** /**
* @return {bool} * @returns Whether or not the layer is visible
* @type Boolean
*/ */
getVisibility: function() { getVisibility: function() {
return (this.div.style.display != "none"); return (this.div.style.display != "none");