Rename _ol_Overlay_ to Overlay
This commit is contained in:
@@ -45,7 +45,7 @@ var Property = {
|
||||
* @param {olx.OverlayOptions} options Overlay options.
|
||||
* @api
|
||||
*/
|
||||
var _ol_Overlay_ = function(options) {
|
||||
var Overlay = function(options) {
|
||||
|
||||
_ol_Object_.call(this);
|
||||
|
||||
@@ -161,7 +161,7 @@ var _ol_Overlay_ = function(options) {
|
||||
|
||||
};
|
||||
|
||||
inherits(_ol_Overlay_, _ol_Object_);
|
||||
inherits(Overlay, _ol_Object_);
|
||||
|
||||
|
||||
/**
|
||||
@@ -170,7 +170,7 @@ inherits(_ol_Overlay_, _ol_Object_);
|
||||
* @observable
|
||||
* @api
|
||||
*/
|
||||
_ol_Overlay_.prototype.getElement = function() {
|
||||
Overlay.prototype.getElement = function() {
|
||||
return (/** @type {Element|undefined} */ this.get(Property.ELEMENT));
|
||||
};
|
||||
|
||||
@@ -180,7 +180,7 @@ _ol_Overlay_.prototype.getElement = function() {
|
||||
* @return {number|string|undefined} Id.
|
||||
* @api
|
||||
*/
|
||||
_ol_Overlay_.prototype.getId = function() {
|
||||
Overlay.prototype.getId = function() {
|
||||
return this.id;
|
||||
};
|
||||
|
||||
@@ -191,7 +191,7 @@ _ol_Overlay_.prototype.getId = function() {
|
||||
* @observable
|
||||
* @api
|
||||
*/
|
||||
_ol_Overlay_.prototype.getMap = function() {
|
||||
Overlay.prototype.getMap = function() {
|
||||
return (/** @type {ol.PluggableMap|undefined} */ this.get(Property.MAP));
|
||||
};
|
||||
|
||||
@@ -202,7 +202,7 @@ _ol_Overlay_.prototype.getMap = function() {
|
||||
* @observable
|
||||
* @api
|
||||
*/
|
||||
_ol_Overlay_.prototype.getOffset = function() {
|
||||
Overlay.prototype.getOffset = function() {
|
||||
return (/** @type {Array.<number>} */ this.get(Property.OFFSET));
|
||||
};
|
||||
|
||||
@@ -214,7 +214,7 @@ _ol_Overlay_.prototype.getOffset = function() {
|
||||
* @observable
|
||||
* @api
|
||||
*/
|
||||
_ol_Overlay_.prototype.getPosition = function() {
|
||||
Overlay.prototype.getPosition = function() {
|
||||
return (/** @type {ol.Coordinate|undefined} */ this.get(Property.POSITION));
|
||||
};
|
||||
|
||||
@@ -226,7 +226,7 @@ _ol_Overlay_.prototype.getPosition = function() {
|
||||
* @observable
|
||||
* @api
|
||||
*/
|
||||
_ol_Overlay_.prototype.getPositioning = function() {
|
||||
Overlay.prototype.getPositioning = function() {
|
||||
return (/** @type {ol.OverlayPositioning} */ this.get(Property.POSITIONING));
|
||||
};
|
||||
|
||||
@@ -234,7 +234,7 @@ _ol_Overlay_.prototype.getPositioning = function() {
|
||||
/**
|
||||
* @protected
|
||||
*/
|
||||
_ol_Overlay_.prototype.handleElementChanged = function() {
|
||||
Overlay.prototype.handleElementChanged = function() {
|
||||
removeChildren(this.element);
|
||||
var element = this.getElement();
|
||||
if (element) {
|
||||
@@ -246,7 +246,7 @@ _ol_Overlay_.prototype.handleElementChanged = function() {
|
||||
/**
|
||||
* @protected
|
||||
*/
|
||||
_ol_Overlay_.prototype.handleMapChanged = function() {
|
||||
Overlay.prototype.handleMapChanged = function() {
|
||||
if (this.mapPostrenderListenerKey) {
|
||||
removeNode(this.element);
|
||||
_ol_events_.unlistenByKey(this.mapPostrenderListenerKey);
|
||||
@@ -271,7 +271,7 @@ _ol_Overlay_.prototype.handleMapChanged = function() {
|
||||
/**
|
||||
* @protected
|
||||
*/
|
||||
_ol_Overlay_.prototype.render = function() {
|
||||
Overlay.prototype.render = function() {
|
||||
this.updatePixelPosition();
|
||||
};
|
||||
|
||||
@@ -279,7 +279,7 @@ _ol_Overlay_.prototype.render = function() {
|
||||
/**
|
||||
* @protected
|
||||
*/
|
||||
_ol_Overlay_.prototype.handleOffsetChanged = function() {
|
||||
Overlay.prototype.handleOffsetChanged = function() {
|
||||
this.updatePixelPosition();
|
||||
};
|
||||
|
||||
@@ -287,7 +287,7 @@ _ol_Overlay_.prototype.handleOffsetChanged = function() {
|
||||
/**
|
||||
* @protected
|
||||
*/
|
||||
_ol_Overlay_.prototype.handlePositionChanged = function() {
|
||||
Overlay.prototype.handlePositionChanged = function() {
|
||||
this.updatePixelPosition();
|
||||
if (this.get(Property.POSITION) && this.autoPan) {
|
||||
this.panIntoView();
|
||||
@@ -298,7 +298,7 @@ _ol_Overlay_.prototype.handlePositionChanged = function() {
|
||||
/**
|
||||
* @protected
|
||||
*/
|
||||
_ol_Overlay_.prototype.handlePositioningChanged = function() {
|
||||
Overlay.prototype.handlePositioningChanged = function() {
|
||||
this.updatePixelPosition();
|
||||
};
|
||||
|
||||
@@ -309,7 +309,7 @@ _ol_Overlay_.prototype.handlePositioningChanged = function() {
|
||||
* @observable
|
||||
* @api
|
||||
*/
|
||||
_ol_Overlay_.prototype.setElement = function(element) {
|
||||
Overlay.prototype.setElement = function(element) {
|
||||
this.set(Property.ELEMENT, element);
|
||||
};
|
||||
|
||||
@@ -320,7 +320,7 @@ _ol_Overlay_.prototype.setElement = function(element) {
|
||||
* @observable
|
||||
* @api
|
||||
*/
|
||||
_ol_Overlay_.prototype.setMap = function(map) {
|
||||
Overlay.prototype.setMap = function(map) {
|
||||
this.set(Property.MAP, map);
|
||||
};
|
||||
|
||||
@@ -331,7 +331,7 @@ _ol_Overlay_.prototype.setMap = function(map) {
|
||||
* @observable
|
||||
* @api
|
||||
*/
|
||||
_ol_Overlay_.prototype.setOffset = function(offset) {
|
||||
Overlay.prototype.setOffset = function(offset) {
|
||||
this.set(Property.OFFSET, offset);
|
||||
};
|
||||
|
||||
@@ -344,7 +344,7 @@ _ol_Overlay_.prototype.setOffset = function(offset) {
|
||||
* @observable
|
||||
* @api
|
||||
*/
|
||||
_ol_Overlay_.prototype.setPosition = function(position) {
|
||||
Overlay.prototype.setPosition = function(position) {
|
||||
this.set(Property.POSITION, position);
|
||||
};
|
||||
|
||||
@@ -354,7 +354,7 @@ _ol_Overlay_.prototype.setPosition = function(position) {
|
||||
* (if necessary).
|
||||
* @protected
|
||||
*/
|
||||
_ol_Overlay_.prototype.panIntoView = function() {
|
||||
Overlay.prototype.panIntoView = function() {
|
||||
var map = this.getMap();
|
||||
|
||||
if (!map || !map.getTargetElement()) {
|
||||
@@ -414,7 +414,7 @@ _ol_Overlay_.prototype.panIntoView = function() {
|
||||
* @return {ol.Extent} The extent.
|
||||
* @protected
|
||||
*/
|
||||
_ol_Overlay_.prototype.getRect = function(element, size) {
|
||||
Overlay.prototype.getRect = function(element, size) {
|
||||
var box = element.getBoundingClientRect();
|
||||
var offsetX = box.left + window.pageXOffset;
|
||||
var offsetY = box.top + window.pageYOffset;
|
||||
@@ -434,7 +434,7 @@ _ol_Overlay_.prototype.getRect = function(element, size) {
|
||||
* @observable
|
||||
* @api
|
||||
*/
|
||||
_ol_Overlay_.prototype.setPositioning = function(positioning) {
|
||||
Overlay.prototype.setPositioning = function(positioning) {
|
||||
this.set(Property.POSITIONING, positioning);
|
||||
};
|
||||
|
||||
@@ -444,7 +444,7 @@ _ol_Overlay_.prototype.setPositioning = function(positioning) {
|
||||
* @param {boolean} visible Element visibility.
|
||||
* @protected
|
||||
*/
|
||||
_ol_Overlay_.prototype.setVisible = function(visible) {
|
||||
Overlay.prototype.setVisible = function(visible) {
|
||||
if (this.rendered.visible !== visible) {
|
||||
this.element.style.display = visible ? '' : 'none';
|
||||
this.rendered.visible = visible;
|
||||
@@ -456,7 +456,7 @@ _ol_Overlay_.prototype.setVisible = function(visible) {
|
||||
* Update pixel position.
|
||||
* @protected
|
||||
*/
|
||||
_ol_Overlay_.prototype.updatePixelPosition = function() {
|
||||
Overlay.prototype.updatePixelPosition = function() {
|
||||
var map = this.getMap();
|
||||
var position = this.getPosition();
|
||||
if (!map || !map.isRendered() || !position) {
|
||||
@@ -475,7 +475,7 @@ _ol_Overlay_.prototype.updatePixelPosition = function() {
|
||||
* @param {ol.Size|undefined} mapSize The map size.
|
||||
* @protected
|
||||
*/
|
||||
_ol_Overlay_.prototype.updateRenderedPosition = function(pixel, mapSize) {
|
||||
Overlay.prototype.updateRenderedPosition = function(pixel, mapSize) {
|
||||
var style = this.element.style;
|
||||
var offset = this.getOffset();
|
||||
|
||||
@@ -541,8 +541,8 @@ _ol_Overlay_.prototype.updateRenderedPosition = function(pixel, mapSize) {
|
||||
* @public
|
||||
* @return {olx.OverlayOptions} overlay options
|
||||
*/
|
||||
_ol_Overlay_.prototype.getOptions = function() {
|
||||
Overlay.prototype.getOptions = function() {
|
||||
return this.options;
|
||||
};
|
||||
|
||||
export default _ol_Overlay_;
|
||||
export default Overlay;
|
||||
|
||||
Reference in New Issue
Block a user