Rename ol.control.MousePositionProperty to ol.control.MousePosition.Property

This commit is contained in:
Frederic Junod
2016-08-29 12:36:14 +02:00
committed by Tim Schaub
parent 7df8b2bb2b
commit f09460b717
2 changed files with 15 additions and 14 deletions

View File

@@ -17,6 +17,7 @@ A number of internal types have been renamed. This will not affect those who us
* rename `ol.GeolocationProperty` to `ol.Geolocation.Property`
* rename `ol.OverlayProperty` to `ol.Overlay.Property`
* rename `ol.OverlayPositioning` to `ol.Overlay.Positioning`
* rename `ol.control.MousePositionProperty` to `ol.control.MousePosition.Property`
### v3.18.0

View File

@@ -10,15 +10,6 @@ goog.require('ol.control.Control');
goog.require('ol.proj');
/**
* @enum {string}
*/
ol.control.MousePositionProperty = {
PROJECTION: 'projection',
COORDINATE_FORMAT: 'coordinateFormat'
};
/**
* @classdesc
* A control to show the 2D coordinates of the mouse cursor. By default, these
@@ -49,7 +40,7 @@ ol.control.MousePosition = function(opt_options) {
});
ol.events.listen(this,
ol.Object.getChangeEventType(ol.control.MousePositionProperty.PROJECTION),
ol.Object.getChangeEventType(ol.control.MousePosition.Property.PROJECTION),
this.handleProjectionChanged_, this);
if (options.coordinateFormat) {
@@ -131,7 +122,7 @@ ol.control.MousePosition.prototype.handleProjectionChanged_ = function() {
*/
ol.control.MousePosition.prototype.getCoordinateFormat = function() {
return /** @type {ol.CoordinateFormatType|undefined} */ (
this.get(ol.control.MousePositionProperty.COORDINATE_FORMAT));
this.get(ol.control.MousePosition.Property.COORDINATE_FORMAT));
};
@@ -144,7 +135,7 @@ ol.control.MousePosition.prototype.getCoordinateFormat = function() {
*/
ol.control.MousePosition.prototype.getProjection = function() {
return /** @type {ol.proj.Projection|undefined} */ (
this.get(ol.control.MousePositionProperty.PROJECTION));
this.get(ol.control.MousePosition.Property.PROJECTION));
};
@@ -195,7 +186,7 @@ ol.control.MousePosition.prototype.setMap = function(map) {
* @api stable
*/
ol.control.MousePosition.prototype.setCoordinateFormat = function(format) {
this.set(ol.control.MousePositionProperty.COORDINATE_FORMAT, format);
this.set(ol.control.MousePosition.Property.COORDINATE_FORMAT, format);
};
@@ -207,7 +198,7 @@ ol.control.MousePosition.prototype.setCoordinateFormat = function(format) {
* @api stable
*/
ol.control.MousePosition.prototype.setProjection = function(projection) {
this.set(ol.control.MousePositionProperty.PROJECTION, projection);
this.set(ol.control.MousePosition.Property.PROJECTION, projection);
};
@@ -244,3 +235,12 @@ ol.control.MousePosition.prototype.updateHTML_ = function(pixel) {
this.renderedHTML_ = html;
}
};
/**
* @enum {string}
*/
ol.control.MousePosition.Property = {
PROJECTION: 'projection',
COORDINATE_FORMAT: 'coordinateFormat'
};