Rename ol.OverlayProperty to ol.Overlay.Property
This commit is contained in:
committed by
Tim Schaub
parent
1fa91717bd
commit
556e443705
@@ -15,6 +15,7 @@ A number of internal types have been renamed. This will not affect those who us
|
|||||||
* rename `ol.CollectionProperty` to `ol.Collection.Property`
|
* rename `ol.CollectionProperty` to `ol.Collection.Property`
|
||||||
* rename `ol.DeviceOrientationProperty` to `ol.DeviceOrientation.Property`
|
* rename `ol.DeviceOrientationProperty` to `ol.DeviceOrientation.Property`
|
||||||
* rename `ol.GeolocationProperty` to `ol.Geolocation.Property`
|
* rename `ol.GeolocationProperty` to `ol.Geolocation.Property`
|
||||||
|
* rename `ol.OverlayProperty` to `ol.Overlay.Property`
|
||||||
|
|
||||||
### v3.18.0
|
### v3.18.0
|
||||||
|
|
||||||
|
|||||||
+28
-28
@@ -10,18 +10,6 @@ goog.require('ol.dom');
|
|||||||
goog.require('ol.extent');
|
goog.require('ol.extent');
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @enum {string}
|
|
||||||
*/
|
|
||||||
ol.OverlayProperty = {
|
|
||||||
ELEMENT: 'element',
|
|
||||||
MAP: 'map',
|
|
||||||
OFFSET: 'offset',
|
|
||||||
POSITION: 'position',
|
|
||||||
POSITIONING: 'positioning'
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Overlay position: `'bottom-left'`, `'bottom-center'`, `'bottom-right'`,
|
* Overlay position: `'bottom-left'`, `'bottom-center'`, `'bottom-right'`,
|
||||||
* `'center-left'`, `'center-center'`, `'center-right'`, `'top-left'`,
|
* `'center-left'`, `'center-center'`, `'center-right'`, `'top-left'`,
|
||||||
@@ -136,23 +124,23 @@ ol.Overlay = function(options) {
|
|||||||
this.mapPostrenderListenerKey_ = null;
|
this.mapPostrenderListenerKey_ = null;
|
||||||
|
|
||||||
ol.events.listen(
|
ol.events.listen(
|
||||||
this, ol.Object.getChangeEventType(ol.OverlayProperty.ELEMENT),
|
this, ol.Object.getChangeEventType(ol.Overlay.Property.ELEMENT),
|
||||||
this.handleElementChanged, this);
|
this.handleElementChanged, this);
|
||||||
|
|
||||||
ol.events.listen(
|
ol.events.listen(
|
||||||
this, ol.Object.getChangeEventType(ol.OverlayProperty.MAP),
|
this, ol.Object.getChangeEventType(ol.Overlay.Property.MAP),
|
||||||
this.handleMapChanged, this);
|
this.handleMapChanged, this);
|
||||||
|
|
||||||
ol.events.listen(
|
ol.events.listen(
|
||||||
this, ol.Object.getChangeEventType(ol.OverlayProperty.OFFSET),
|
this, ol.Object.getChangeEventType(ol.Overlay.Property.OFFSET),
|
||||||
this.handleOffsetChanged, this);
|
this.handleOffsetChanged, this);
|
||||||
|
|
||||||
ol.events.listen(
|
ol.events.listen(
|
||||||
this, ol.Object.getChangeEventType(ol.OverlayProperty.POSITION),
|
this, ol.Object.getChangeEventType(ol.Overlay.Property.POSITION),
|
||||||
this.handlePositionChanged, this);
|
this.handlePositionChanged, this);
|
||||||
|
|
||||||
ol.events.listen(
|
ol.events.listen(
|
||||||
this, ol.Object.getChangeEventType(ol.OverlayProperty.POSITIONING),
|
this, ol.Object.getChangeEventType(ol.Overlay.Property.POSITIONING),
|
||||||
this.handlePositioningChanged, this);
|
this.handlePositioningChanged, this);
|
||||||
|
|
||||||
if (options.element !== undefined) {
|
if (options.element !== undefined) {
|
||||||
@@ -181,7 +169,7 @@ ol.inherits(ol.Overlay, ol.Object);
|
|||||||
*/
|
*/
|
||||||
ol.Overlay.prototype.getElement = function() {
|
ol.Overlay.prototype.getElement = function() {
|
||||||
return /** @type {Element|undefined} */ (
|
return /** @type {Element|undefined} */ (
|
||||||
this.get(ol.OverlayProperty.ELEMENT));
|
this.get(ol.Overlay.Property.ELEMENT));
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -203,7 +191,7 @@ ol.Overlay.prototype.getId = function() {
|
|||||||
*/
|
*/
|
||||||
ol.Overlay.prototype.getMap = function() {
|
ol.Overlay.prototype.getMap = function() {
|
||||||
return /** @type {ol.Map|undefined} */ (
|
return /** @type {ol.Map|undefined} */ (
|
||||||
this.get(ol.OverlayProperty.MAP));
|
this.get(ol.Overlay.Property.MAP));
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -215,7 +203,7 @@ ol.Overlay.prototype.getMap = function() {
|
|||||||
*/
|
*/
|
||||||
ol.Overlay.prototype.getOffset = function() {
|
ol.Overlay.prototype.getOffset = function() {
|
||||||
return /** @type {Array.<number>} */ (
|
return /** @type {Array.<number>} */ (
|
||||||
this.get(ol.OverlayProperty.OFFSET));
|
this.get(ol.Overlay.Property.OFFSET));
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -228,7 +216,7 @@ ol.Overlay.prototype.getOffset = function() {
|
|||||||
*/
|
*/
|
||||||
ol.Overlay.prototype.getPosition = function() {
|
ol.Overlay.prototype.getPosition = function() {
|
||||||
return /** @type {ol.Coordinate|undefined} */ (
|
return /** @type {ol.Coordinate|undefined} */ (
|
||||||
this.get(ol.OverlayProperty.POSITION));
|
this.get(ol.Overlay.Property.POSITION));
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -241,7 +229,7 @@ ol.Overlay.prototype.getPosition = function() {
|
|||||||
*/
|
*/
|
||||||
ol.Overlay.prototype.getPositioning = function() {
|
ol.Overlay.prototype.getPositioning = function() {
|
||||||
return /** @type {ol.OverlayPositioning} */ (
|
return /** @type {ol.OverlayPositioning} */ (
|
||||||
this.get(ol.OverlayProperty.POSITIONING));
|
this.get(ol.Overlay.Property.POSITIONING));
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -303,7 +291,7 @@ ol.Overlay.prototype.handleOffsetChanged = function() {
|
|||||||
*/
|
*/
|
||||||
ol.Overlay.prototype.handlePositionChanged = function() {
|
ol.Overlay.prototype.handlePositionChanged = function() {
|
||||||
this.updatePixelPosition();
|
this.updatePixelPosition();
|
||||||
if (this.get(ol.OverlayProperty.POSITION) !== undefined && this.autoPan) {
|
if (this.get(ol.Overlay.Property.POSITION) !== undefined && this.autoPan) {
|
||||||
this.panIntoView_();
|
this.panIntoView_();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -324,7 +312,7 @@ ol.Overlay.prototype.handlePositioningChanged = function() {
|
|||||||
* @api stable
|
* @api stable
|
||||||
*/
|
*/
|
||||||
ol.Overlay.prototype.setElement = function(element) {
|
ol.Overlay.prototype.setElement = function(element) {
|
||||||
this.set(ol.OverlayProperty.ELEMENT, element);
|
this.set(ol.Overlay.Property.ELEMENT, element);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -335,7 +323,7 @@ ol.Overlay.prototype.setElement = function(element) {
|
|||||||
* @api stable
|
* @api stable
|
||||||
*/
|
*/
|
||||||
ol.Overlay.prototype.setMap = function(map) {
|
ol.Overlay.prototype.setMap = function(map) {
|
||||||
this.set(ol.OverlayProperty.MAP, map);
|
this.set(ol.Overlay.Property.MAP, map);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -346,7 +334,7 @@ ol.Overlay.prototype.setMap = function(map) {
|
|||||||
* @api stable
|
* @api stable
|
||||||
*/
|
*/
|
||||||
ol.Overlay.prototype.setOffset = function(offset) {
|
ol.Overlay.prototype.setOffset = function(offset) {
|
||||||
this.set(ol.OverlayProperty.OFFSET, offset);
|
this.set(ol.Overlay.Property.OFFSET, offset);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -359,7 +347,7 @@ ol.Overlay.prototype.setOffset = function(offset) {
|
|||||||
* @api stable
|
* @api stable
|
||||||
*/
|
*/
|
||||||
ol.Overlay.prototype.setPosition = function(position) {
|
ol.Overlay.prototype.setPosition = function(position) {
|
||||||
this.set(ol.OverlayProperty.POSITION, position);
|
this.set(ol.Overlay.Property.POSITION, position);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -450,7 +438,7 @@ ol.Overlay.prototype.getRect_ = function(element, size) {
|
|||||||
* @api stable
|
* @api stable
|
||||||
*/
|
*/
|
||||||
ol.Overlay.prototype.setPositioning = function(positioning) {
|
ol.Overlay.prototype.setPositioning = function(positioning) {
|
||||||
this.set(ol.OverlayProperty.POSITIONING, positioning);
|
this.set(ol.Overlay.Property.POSITIONING, positioning);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -551,3 +539,15 @@ ol.Overlay.prototype.updateRenderedPosition = function(pixel, mapSize) {
|
|||||||
|
|
||||||
this.setVisible(true);
|
this.setVisible(true);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @enum {string}
|
||||||
|
*/
|
||||||
|
ol.Overlay.Property = {
|
||||||
|
ELEMENT: 'element',
|
||||||
|
MAP: 'map',
|
||||||
|
OFFSET: 'offset',
|
||||||
|
POSITION: 'position',
|
||||||
|
POSITIONING: 'positioning'
|
||||||
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user