From 9c0ce6e635166feeb1c9ff22d8c1f14a032806c3 Mon Sep 17 00:00:00 2001 From: Tom Payne Date: Wed, 11 Jul 2012 21:18:47 +0200 Subject: [PATCH] Make ol.LayerProperty public --- src/ol/layer.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/ol/layer.js b/src/ol/layer.js index d437bb9c76..d684502eea 100644 --- a/src/ol/layer.js +++ b/src/ol/layer.js @@ -1,4 +1,5 @@ goog.provide('ol.Layer'); +goog.provide('ol.LayerProperty'); goog.require('ol.Object'); goog.require('ol.Store'); @@ -6,9 +7,8 @@ goog.require('ol.Store'); /** * @enum {string} - * @private */ -ol.LayerRendererOptionsProperty_ = { +ol.LayerProperty = { OPACITY: 'opacity', VISIBLE: 'visible' }; @@ -47,7 +47,7 @@ goog.inherits(ol.Layer, ol.Object); */ ol.Layer.prototype.getOpacity = function() { return /** @type {number} */ ( - this.get(ol.LayerRendererOptionsProperty_.OPACITY)); + this.get(ol.LayerProperty.OPACITY)); }; @@ -64,7 +64,7 @@ ol.Layer.prototype.getStore = function() { */ ol.Layer.prototype.getVisible = function() { return /** @type {boolean} */ ( - this.get(ol.LayerRendererOptionsProperty_.VISIBLE)); + this.get(ol.LayerProperty.VISIBLE)); }; @@ -72,7 +72,7 @@ ol.Layer.prototype.getVisible = function() { * @param {number} opacity Opacity. */ ol.Layer.prototype.setOpacity = function(opacity) { - this.set(ol.LayerRendererOptionsProperty_.OPACITY, opacity); + this.set(ol.LayerProperty.OPACITY, opacity); }; @@ -80,5 +80,5 @@ ol.Layer.prototype.setOpacity = function(opacity) { * @param {boolean} visible Visible. */ ol.Layer.prototype.setVisible = function(visible) { - this.set(ol.LayerRendererOptionsProperty_.VISIBLE, visible); + this.set(ol.LayerProperty.VISIBLE, visible); };