Allow ol.source.Source state option to be a string
This commit is contained in:
@@ -23,7 +23,7 @@ ol.source.State = {
|
||||
* extent: (ol.Extent|undefined),
|
||||
* logo: (string|undefined),
|
||||
* projection: ol.proj.ProjectionLike,
|
||||
* state: (ol.source.State|undefined)}}
|
||||
* state: (ol.source.State|string|undefined)}}
|
||||
* @todo stability experimental
|
||||
*/
|
||||
ol.source.SourceOptions;
|
||||
@@ -72,7 +72,7 @@ ol.source.Source = function(options) {
|
||||
* @type {ol.source.State}
|
||||
*/
|
||||
this.state_ = goog.isDef(options.state) ?
|
||||
options.state : ol.source.State.READY;
|
||||
/** @type {ol.source.State} */ (options.state) : ol.source.State.READY;
|
||||
|
||||
};
|
||||
goog.inherits(ol.source.Source, ol.Observable);
|
||||
|
||||
Reference in New Issue
Block a user