From 4c6b232bd2c6f7c57dce26443eea6d231bbffe11 Mon Sep 17 00:00:00 2001 From: euzuro Date: Tue, 20 Jun 2006 17:47:26 +0000 Subject: [PATCH] coding standards / JSDOC git-svn-id: http://svn.openlayers.org/trunk/openlayers@621 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf --- lib/OpenLayers/Layer.js | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/lib/OpenLayers/Layer.js b/lib/OpenLayers/Layer.js index f976aa4ab4..f400d052e6 100644 --- a/lib/OpenLayers/Layer.js +++ b/lib/OpenLayers/Layer.js @@ -1,11 +1,13 @@ +/** + * @class + */ OpenLayers.Layer = Class.create(); - OpenLayers.Layer.prototype = { - // str + /** @type String */ name: null, - // DOMElement + /** @type DOMElement */ div: null, /** This variable is set in map.addLayer, not within the layer itself @@ -13,8 +15,10 @@ OpenLayers.Layer.prototype = { map: null, /** - * @param {str} name - */ + * @constructor + * + * @param {String} name + */ initialize: function(name) { if (arguments.length > 0) { this.name = name; @@ -29,7 +33,7 @@ OpenLayers.Layer.prototype = { /** * Destroy is a destructor: this is to alleviate cyclic references which * the Javascript garbage cleaner can not take care of on its own. - */ + */ destroy: function() { if (this.map != null) { this.map.removeLayer(this); @@ -39,9 +43,9 @@ OpenLayers.Layer.prototype = { /** * @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 return; }, @@ -54,7 +58,8 @@ OpenLayers.Layer.prototype = { }, /** - * @return {bool} + * @returns Whether or not the layer is visible + * @type Boolean */ getVisibility: function() { return (this.div.style.display != "none");