Rename _ol_MapProperty_ to MapProperty

This commit is contained in:
Frederic Junod
2018-01-11 13:48:23 +01:00
parent fe6e66958c
commit 356cea1611
2 changed files with 18 additions and 18 deletions
+16 -16
View File
@@ -9,7 +9,7 @@ import MapBrowserEventHandler from './MapBrowserEventHandler.js';
import MapBrowserEventType from './MapBrowserEventType.js'; import MapBrowserEventType from './MapBrowserEventType.js';
import MapEvent from './MapEvent.js'; import MapEvent from './MapEvent.js';
import MapEventType from './MapEventType.js'; import MapEventType from './MapEventType.js';
import _ol_MapProperty_ from './MapProperty.js'; import MapProperty from './MapProperty.js';
import BaseObject from './Object.js'; import BaseObject from './Object.js';
import ObjectEventType from './ObjectEventType.js'; import ObjectEventType from './ObjectEventType.js';
import TileQueue from './TileQueue.js'; import TileQueue from './TileQueue.js';
@@ -337,13 +337,13 @@ var PluggableMap = function(options) {
this.skippedFeatureUids_ = {}; this.skippedFeatureUids_ = {};
_ol_events_.listen( _ol_events_.listen(
this, BaseObject.getChangeEventType(_ol_MapProperty_.LAYERGROUP), this, BaseObject.getChangeEventType(MapProperty.LAYERGROUP),
this.handleLayerGroupChanged_, this); this.handleLayerGroupChanged_, this);
_ol_events_.listen(this, BaseObject.getChangeEventType(_ol_MapProperty_.VIEW), _ol_events_.listen(this, BaseObject.getChangeEventType(MapProperty.VIEW),
this.handleViewChanged_, this); this.handleViewChanged_, this);
_ol_events_.listen(this, BaseObject.getChangeEventType(_ol_MapProperty_.SIZE), _ol_events_.listen(this, BaseObject.getChangeEventType(MapProperty.SIZE),
this.handleSizeChanged_, this); this.handleSizeChanged_, this);
_ol_events_.listen(this, BaseObject.getChangeEventType(_ol_MapProperty_.TARGET), _ol_events_.listen(this, BaseObject.getChangeEventType(MapProperty.TARGET),
this.handleTargetChanged_, this); this.handleTargetChanged_, this);
// setProperties will trigger the rendering of the map if the map // setProperties will trigger the rendering of the map if the map
@@ -661,7 +661,7 @@ PluggableMap.prototype.getEventPixel = function(event) {
*/ */
PluggableMap.prototype.getTarget = function() { PluggableMap.prototype.getTarget = function() {
return ( return (
/** @type {Element|string|undefined} */ this.get(_ol_MapProperty_.TARGET) /** @type {Element|string|undefined} */ this.get(MapProperty.TARGET)
); );
}; };
@@ -759,7 +759,7 @@ PluggableMap.prototype.getInteractions = function() {
*/ */
PluggableMap.prototype.getLayerGroup = function() { PluggableMap.prototype.getLayerGroup = function() {
return ( return (
/** @type {ol.layer.Group} */ this.get(_ol_MapProperty_.LAYERGROUP) /** @type {ol.layer.Group} */ this.get(MapProperty.LAYERGROUP)
); );
}; };
@@ -810,7 +810,7 @@ PluggableMap.prototype.getRenderer = function() {
*/ */
PluggableMap.prototype.getSize = function() { PluggableMap.prototype.getSize = function() {
return ( return (
/** @type {ol.Size|undefined} */ this.get(_ol_MapProperty_.SIZE) /** @type {ol.Size|undefined} */ this.get(MapProperty.SIZE)
); );
}; };
@@ -824,7 +824,7 @@ PluggableMap.prototype.getSize = function() {
*/ */
PluggableMap.prototype.getView = function() { PluggableMap.prototype.getView = function() {
return ( return (
/** @type {ol.View} */ this.get(_ol_MapProperty_.VIEW) /** @type {ol.View} */ this.get(MapProperty.VIEW)
); );
}; };
@@ -1287,7 +1287,7 @@ PluggableMap.prototype.renderFrame_ = function(time) {
* @api * @api
*/ */
PluggableMap.prototype.setLayerGroup = function(layerGroup) { PluggableMap.prototype.setLayerGroup = function(layerGroup) {
this.set(_ol_MapProperty_.LAYERGROUP, layerGroup); this.set(MapProperty.LAYERGROUP, layerGroup);
}; };
@@ -1298,7 +1298,7 @@ PluggableMap.prototype.setLayerGroup = function(layerGroup) {
* @api * @api
*/ */
PluggableMap.prototype.setSize = function(size) { PluggableMap.prototype.setSize = function(size) {
this.set(_ol_MapProperty_.SIZE, size); this.set(MapProperty.SIZE, size);
}; };
@@ -1310,7 +1310,7 @@ PluggableMap.prototype.setSize = function(size) {
* @api * @api
*/ */
PluggableMap.prototype.setTarget = function(target) { PluggableMap.prototype.setTarget = function(target) {
this.set(_ol_MapProperty_.TARGET, target); this.set(MapProperty.TARGET, target);
}; };
@@ -1321,7 +1321,7 @@ PluggableMap.prototype.setTarget = function(target) {
* @api * @api
*/ */
PluggableMap.prototype.setView = function(view) { PluggableMap.prototype.setView = function(view) {
this.set(_ol_MapProperty_.VIEW, view); this.set(MapProperty.VIEW, view);
}; };
@@ -1406,11 +1406,11 @@ function createOptionsInternal(options) {
var layerGroup = (options.layers instanceof _ol_layer_Group_) ? var layerGroup = (options.layers instanceof _ol_layer_Group_) ?
options.layers : new _ol_layer_Group_({layers: options.layers}); options.layers : new _ol_layer_Group_({layers: options.layers});
values[_ol_MapProperty_.LAYERGROUP] = layerGroup; values[MapProperty.LAYERGROUP] = layerGroup;
values[_ol_MapProperty_.TARGET] = options.target; values[MapProperty.TARGET] = options.target;
values[_ol_MapProperty_.VIEW] = options.view !== undefined ? values[MapProperty.VIEW] = options.view !== undefined ?
options.view : new View(); options.view : new View();
/** /**
+2 -2
View File
@@ -5,7 +5,7 @@ import {inherits} from '../index.js';
import _ol_Collection_ from '../Collection.js'; import _ol_Collection_ from '../Collection.js';
import PluggableMap from '../PluggableMap.js'; import PluggableMap from '../PluggableMap.js';
import MapEventType from '../MapEventType.js'; import MapEventType from '../MapEventType.js';
import _ol_MapProperty_ from '../MapProperty.js'; import MapProperty from '../MapProperty.js';
import BaseObject from '../Object.js'; import BaseObject from '../Object.js';
import ObjectEventType from '../ObjectEventType.js'; import ObjectEventType from '../ObjectEventType.js';
import Overlay from '../Overlay.js'; import Overlay from '../Overlay.js';
@@ -252,7 +252,7 @@ OverviewMap.prototype.setMap = function(map) {
* @private * @private
*/ */
OverviewMap.prototype.handleMapPropertyChange_ = function(event) { OverviewMap.prototype.handleMapPropertyChange_ = function(event) {
if (event.key === _ol_MapProperty_.VIEW) { if (event.key === MapProperty.VIEW) {
var oldView = /** @type {ol.View} */ (event.oldValue); var oldView = /** @type {ol.View} */ (event.oldValue);
if (oldView) { if (oldView) {
this.unbindView_(oldView); this.unbindView_(oldView);