Rename _ol_layer_Base_ to BaseLayer
This commit is contained in:
+20
-20
@@ -21,7 +21,7 @@ import _ol_obj_ from '../obj.js';
|
|||||||
* @param {olx.layer.BaseOptions} options Layer options.
|
* @param {olx.layer.BaseOptions} options Layer options.
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
var _ol_layer_Base_ = function(options) {
|
var BaseLayer = function(options) {
|
||||||
|
|
||||||
BaseObject.call(this);
|
BaseObject.call(this);
|
||||||
|
|
||||||
@@ -60,14 +60,14 @@ var _ol_layer_Base_ = function(options) {
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
inherits(_ol_layer_Base_, BaseObject);
|
inherits(BaseLayer, BaseObject);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the layer type (used when creating a layer renderer).
|
* Get the layer type (used when creating a layer renderer).
|
||||||
* @return {ol.LayerType} The layer type.
|
* @return {ol.LayerType} The layer type.
|
||||||
*/
|
*/
|
||||||
_ol_layer_Base_.prototype.getType = function() {
|
BaseLayer.prototype.getType = function() {
|
||||||
return this.type;
|
return this.type;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -75,7 +75,7 @@ _ol_layer_Base_.prototype.getType = function() {
|
|||||||
/**
|
/**
|
||||||
* @return {ol.LayerState} Layer state.
|
* @return {ol.LayerState} Layer state.
|
||||||
*/
|
*/
|
||||||
_ol_layer_Base_.prototype.getLayerState = function() {
|
BaseLayer.prototype.getLayerState = function() {
|
||||||
this.state_.opacity = clamp(this.getOpacity(), 0, 1);
|
this.state_.opacity = clamp(this.getOpacity(), 0, 1);
|
||||||
this.state_.sourceState = this.getSourceState();
|
this.state_.sourceState = this.getSourceState();
|
||||||
this.state_.visible = this.getVisible();
|
this.state_.visible = this.getVisible();
|
||||||
@@ -94,7 +94,7 @@ _ol_layer_Base_.prototype.getLayerState = function() {
|
|||||||
* modified in place).
|
* modified in place).
|
||||||
* @return {Array.<ol.layer.Layer>} Array of layers.
|
* @return {Array.<ol.layer.Layer>} Array of layers.
|
||||||
*/
|
*/
|
||||||
_ol_layer_Base_.prototype.getLayersArray = function(opt_array) {};
|
BaseLayer.prototype.getLayersArray = function(opt_array) {};
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -103,7 +103,7 @@ _ol_layer_Base_.prototype.getLayersArray = function(opt_array) {};
|
|||||||
* states (to be modified in place).
|
* states (to be modified in place).
|
||||||
* @return {Array.<ol.LayerState>} List of layer states.
|
* @return {Array.<ol.LayerState>} List of layer states.
|
||||||
*/
|
*/
|
||||||
_ol_layer_Base_.prototype.getLayerStatesArray = function(opt_states) {};
|
BaseLayer.prototype.getLayerStatesArray = function(opt_states) {};
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -113,7 +113,7 @@ _ol_layer_Base_.prototype.getLayerStatesArray = function(opt_states) {};
|
|||||||
* @observable
|
* @observable
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
_ol_layer_Base_.prototype.getExtent = function() {
|
BaseLayer.prototype.getExtent = function() {
|
||||||
return (
|
return (
|
||||||
/** @type {ol.Extent|undefined} */ this.get(LayerProperty.EXTENT)
|
/** @type {ol.Extent|undefined} */ this.get(LayerProperty.EXTENT)
|
||||||
);
|
);
|
||||||
@@ -126,7 +126,7 @@ _ol_layer_Base_.prototype.getExtent = function() {
|
|||||||
* @observable
|
* @observable
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
_ol_layer_Base_.prototype.getMaxResolution = function() {
|
BaseLayer.prototype.getMaxResolution = function() {
|
||||||
return (
|
return (
|
||||||
/** @type {number} */ this.get(LayerProperty.MAX_RESOLUTION)
|
/** @type {number} */ this.get(LayerProperty.MAX_RESOLUTION)
|
||||||
);
|
);
|
||||||
@@ -139,7 +139,7 @@ _ol_layer_Base_.prototype.getMaxResolution = function() {
|
|||||||
* @observable
|
* @observable
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
_ol_layer_Base_.prototype.getMinResolution = function() {
|
BaseLayer.prototype.getMinResolution = function() {
|
||||||
return (
|
return (
|
||||||
/** @type {number} */ this.get(LayerProperty.MIN_RESOLUTION)
|
/** @type {number} */ this.get(LayerProperty.MIN_RESOLUTION)
|
||||||
);
|
);
|
||||||
@@ -152,7 +152,7 @@ _ol_layer_Base_.prototype.getMinResolution = function() {
|
|||||||
* @observable
|
* @observable
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
_ol_layer_Base_.prototype.getOpacity = function() {
|
BaseLayer.prototype.getOpacity = function() {
|
||||||
return (
|
return (
|
||||||
/** @type {number} */ this.get(LayerProperty.OPACITY)
|
/** @type {number} */ this.get(LayerProperty.OPACITY)
|
||||||
);
|
);
|
||||||
@@ -163,7 +163,7 @@ _ol_layer_Base_.prototype.getOpacity = function() {
|
|||||||
* @abstract
|
* @abstract
|
||||||
* @return {ol.source.State} Source state.
|
* @return {ol.source.State} Source state.
|
||||||
*/
|
*/
|
||||||
_ol_layer_Base_.prototype.getSourceState = function() {};
|
BaseLayer.prototype.getSourceState = function() {};
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -172,7 +172,7 @@ _ol_layer_Base_.prototype.getSourceState = function() {};
|
|||||||
* @observable
|
* @observable
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
_ol_layer_Base_.prototype.getVisible = function() {
|
BaseLayer.prototype.getVisible = function() {
|
||||||
return (
|
return (
|
||||||
/** @type {boolean} */ this.get(LayerProperty.VISIBLE)
|
/** @type {boolean} */ this.get(LayerProperty.VISIBLE)
|
||||||
);
|
);
|
||||||
@@ -186,7 +186,7 @@ _ol_layer_Base_.prototype.getVisible = function() {
|
|||||||
* @observable
|
* @observable
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
_ol_layer_Base_.prototype.getZIndex = function() {
|
BaseLayer.prototype.getZIndex = function() {
|
||||||
return (
|
return (
|
||||||
/** @type {number} */ this.get(LayerProperty.Z_INDEX)
|
/** @type {number} */ this.get(LayerProperty.Z_INDEX)
|
||||||
);
|
);
|
||||||
@@ -200,7 +200,7 @@ _ol_layer_Base_.prototype.getZIndex = function() {
|
|||||||
* @observable
|
* @observable
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
_ol_layer_Base_.prototype.setExtent = function(extent) {
|
BaseLayer.prototype.setExtent = function(extent) {
|
||||||
this.set(LayerProperty.EXTENT, extent);
|
this.set(LayerProperty.EXTENT, extent);
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -211,7 +211,7 @@ _ol_layer_Base_.prototype.setExtent = function(extent) {
|
|||||||
* @observable
|
* @observable
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
_ol_layer_Base_.prototype.setMaxResolution = function(maxResolution) {
|
BaseLayer.prototype.setMaxResolution = function(maxResolution) {
|
||||||
this.set(LayerProperty.MAX_RESOLUTION, maxResolution);
|
this.set(LayerProperty.MAX_RESOLUTION, maxResolution);
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -222,7 +222,7 @@ _ol_layer_Base_.prototype.setMaxResolution = function(maxResolution) {
|
|||||||
* @observable
|
* @observable
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
_ol_layer_Base_.prototype.setMinResolution = function(minResolution) {
|
BaseLayer.prototype.setMinResolution = function(minResolution) {
|
||||||
this.set(LayerProperty.MIN_RESOLUTION, minResolution);
|
this.set(LayerProperty.MIN_RESOLUTION, minResolution);
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -233,7 +233,7 @@ _ol_layer_Base_.prototype.setMinResolution = function(minResolution) {
|
|||||||
* @observable
|
* @observable
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
_ol_layer_Base_.prototype.setOpacity = function(opacity) {
|
BaseLayer.prototype.setOpacity = function(opacity) {
|
||||||
this.set(LayerProperty.OPACITY, opacity);
|
this.set(LayerProperty.OPACITY, opacity);
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -244,7 +244,7 @@ _ol_layer_Base_.prototype.setOpacity = function(opacity) {
|
|||||||
* @observable
|
* @observable
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
_ol_layer_Base_.prototype.setVisible = function(visible) {
|
BaseLayer.prototype.setVisible = function(visible) {
|
||||||
this.set(LayerProperty.VISIBLE, visible);
|
this.set(LayerProperty.VISIBLE, visible);
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -256,7 +256,7 @@ _ol_layer_Base_.prototype.setVisible = function(visible) {
|
|||||||
* @observable
|
* @observable
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
_ol_layer_Base_.prototype.setZIndex = function(zindex) {
|
BaseLayer.prototype.setZIndex = function(zindex) {
|
||||||
this.set(LayerProperty.Z_INDEX, zindex);
|
this.set(LayerProperty.Z_INDEX, zindex);
|
||||||
};
|
};
|
||||||
export default _ol_layer_Base_;
|
export default BaseLayer;
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import {assert} from '../asserts.js';
|
|||||||
import _ol_events_ from '../events.js';
|
import _ol_events_ from '../events.js';
|
||||||
import EventType from '../events/EventType.js';
|
import EventType from '../events/EventType.js';
|
||||||
import {getIntersection} from '../extent.js';
|
import {getIntersection} from '../extent.js';
|
||||||
import _ol_layer_Base_ from '../layer/Base.js';
|
import BaseLayer from '../layer/Base.js';
|
||||||
import _ol_obj_ from '../obj.js';
|
import _ol_obj_ from '../obj.js';
|
||||||
import SourceState from '../source/State.js';
|
import SourceState from '../source/State.js';
|
||||||
|
|
||||||
@@ -44,7 +44,7 @@ var _ol_layer_Group_ = function(opt_options) {
|
|||||||
|
|
||||||
var layers = options.layers;
|
var layers = options.layers;
|
||||||
|
|
||||||
_ol_layer_Base_.call(this, baseOptions);
|
BaseLayer.call(this, baseOptions);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @private
|
* @private
|
||||||
@@ -78,7 +78,7 @@ var _ol_layer_Group_ = function(opt_options) {
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
inherits(_ol_layer_Group_, _ol_layer_Base_);
|
inherits(_ol_layer_Group_, BaseLayer);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import _ol_events_ from '../events.js';
|
|||||||
import EventType from '../events/EventType.js';
|
import EventType from '../events/EventType.js';
|
||||||
import {getUid, inherits} from '../index.js';
|
import {getUid, inherits} from '../index.js';
|
||||||
import BaseObject from '../Object.js';
|
import BaseObject from '../Object.js';
|
||||||
import _ol_layer_Base_ from '../layer/Base.js';
|
import BaseLayer from '../layer/Base.js';
|
||||||
import LayerProperty from '../layer/Property.js';
|
import LayerProperty from '../layer/Property.js';
|
||||||
import _ol_obj_ from '../obj.js';
|
import _ol_obj_ from '../obj.js';
|
||||||
import RenderEventType from '../render/EventType.js';
|
import RenderEventType from '../render/EventType.js';
|
||||||
@@ -38,7 +38,7 @@ var _ol_layer_Layer_ = function(options) {
|
|||||||
var baseOptions = _ol_obj_.assign({}, options);
|
var baseOptions = _ol_obj_.assign({}, options);
|
||||||
delete baseOptions.source;
|
delete baseOptions.source;
|
||||||
|
|
||||||
_ol_layer_Base_.call(this, /** @type {olx.layer.BaseOptions} */ (baseOptions));
|
BaseLayer.call(this, /** @type {olx.layer.BaseOptions} */ (baseOptions));
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @private
|
* @private
|
||||||
@@ -70,7 +70,7 @@ var _ol_layer_Layer_ = function(options) {
|
|||||||
this.setSource(source);
|
this.setSource(source);
|
||||||
};
|
};
|
||||||
|
|
||||||
inherits(_ol_layer_Layer_, _ol_layer_Base_);
|
inherits(_ol_layer_Layer_, BaseLayer);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user