diff --git a/lib/OpenLayers/Layer.js b/lib/OpenLayers/Layer.js index 6918a5e1a7..ef738d5f54 100644 --- a/lib/OpenLayers/Layer.js +++ b/lib/OpenLayers/Layer.js @@ -1,10 +1,11 @@ OpenLayers.Layer = Class.create(); OpenLayers.Layer.prototype = { - // str: name + + // str name: null, - // DOMElement: div + // DOMElement div: null, // OpenLayers.Map @@ -16,8 +17,8 @@ OpenLayers.Layer.prototype = { initialize: function(name) { this.name = name; this.div = OpenLayers.Util.createDiv(); - this.div.style.width="100%"; - this.div.style.height="100%"; + this.div.style.width = "100%"; + this.div.style.height = "100%"; }, /** @@ -37,10 +38,16 @@ OpenLayers.Layer.prototype = { return; }, + /** + * @return {bool} + */ getVisibility: function() { return (this.div.style.display != "none"); }, + /** + * @param {bool} visible + */ setVisibility: function(visible) { this.div.style.display = (visible) ? "block" : "none"; }