Rename _ol_CenterConstraint_ to CenterConstraint
This commit is contained in:
@@ -2,14 +2,14 @@
|
||||
* @module ol/CenterConstraint
|
||||
*/
|
||||
import {clamp} from './math.js';
|
||||
var _ol_CenterConstraint_ = {};
|
||||
var CenterConstraint = {};
|
||||
|
||||
|
||||
/**
|
||||
* @param {ol.Extent} extent Extent.
|
||||
* @return {ol.CenterConstraintType} The constraint.
|
||||
*/
|
||||
_ol_CenterConstraint_.createExtent = function(extent) {
|
||||
CenterConstraint.createExtent = function(extent) {
|
||||
return (
|
||||
/**
|
||||
* @param {ol.Coordinate|undefined} center Center.
|
||||
@@ -33,7 +33,7 @@ _ol_CenterConstraint_.createExtent = function(extent) {
|
||||
* @param {ol.Coordinate|undefined} center Center.
|
||||
* @return {ol.Coordinate|undefined} Center.
|
||||
*/
|
||||
_ol_CenterConstraint_.none = function(center) {
|
||||
CenterConstraint.none = function(center) {
|
||||
return center;
|
||||
};
|
||||
export default _ol_CenterConstraint_;
|
||||
export default CenterConstraint;
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
*/
|
||||
import {DEFAULT_TILE_SIZE} from './tilegrid/common.js';
|
||||
import {inherits, getUid, nullFunction} from './index.js';
|
||||
import _ol_CenterConstraint_ from './CenterConstraint.js';
|
||||
import CenterConstraint from './CenterConstraint.js';
|
||||
import _ol_Object_ from './Object.js';
|
||||
import _ol_ResolutionConstraint_ from './ResolutionConstraint.js';
|
||||
import _ol_RotationConstraint_ from './RotationConstraint.js';
|
||||
@@ -1088,9 +1088,9 @@ _ol_View_.prototype.setZoom = function(zoom) {
|
||||
*/
|
||||
_ol_View_.createCenterConstraint_ = function(options) {
|
||||
if (options.extent !== undefined) {
|
||||
return _ol_CenterConstraint_.createExtent(options.extent);
|
||||
return CenterConstraint.createExtent(options.extent);
|
||||
} else {
|
||||
return _ol_CenterConstraint_.none;
|
||||
return CenterConstraint.none;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user