Simplify the way we annotate observable properties
We no longer add observable annotations to the constructor. Instead, we just mark getters (and for read/write properties also setters) with an observable annotation.
This commit is contained in:
@@ -28,8 +28,6 @@ ol.layer.GroupProperty = {
|
||||
* @constructor
|
||||
* @extends {ol.layer.Base}
|
||||
* @param {olx.layer.GroupOptions=} opt_options Layer options.
|
||||
* @todo observable layers {ol.Collection} collection of {@link ol.layer} layers
|
||||
* that are part of this group
|
||||
* @todo api
|
||||
*/
|
||||
ol.layer.Group = function(opt_options) {
|
||||
@@ -142,7 +140,9 @@ ol.layer.Group.prototype.handleLayersRemove_ = function(collectionEvent) {
|
||||
|
||||
|
||||
/**
|
||||
* @return {ol.Collection|undefined} Collection of layers.
|
||||
* @return {ol.Collection|undefined} Collection of {@link ol.layer.Layer layers}
|
||||
* that are part of this group.
|
||||
* @todo observable
|
||||
*/
|
||||
ol.layer.Group.prototype.getLayers = function() {
|
||||
return /** @type {ol.Collection|undefined} */ (this.get(
|
||||
@@ -155,7 +155,9 @@ goog.exportProperty(
|
||||
|
||||
|
||||
/**
|
||||
* @param {ol.Collection|undefined} layers Collection of layers.
|
||||
* @param {ol.Collection|undefined} layers Collection of
|
||||
* {@link ol.layer.Layer layers} that are part of this group.
|
||||
* @todo observable
|
||||
*/
|
||||
ol.layer.Group.prototype.setLayers = function(layers) {
|
||||
this.set(ol.layer.GroupProperty.LAYERS, layers);
|
||||
|
||||
Reference in New Issue
Block a user