Add center constraint to ol.View2D
This commit is contained in:
committed by
Frederic Junod
parent
1c003b5ab1
commit
73b9b6b6a0
@@ -1,5 +1,6 @@
|
||||
goog.provide('ol.Constraints');
|
||||
|
||||
goog.require('ol.CenterConstraintType');
|
||||
goog.require('ol.ResolutionConstraintType');
|
||||
goog.require('ol.RotationConstraintType');
|
||||
|
||||
@@ -7,12 +8,19 @@ goog.require('ol.RotationConstraintType');
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @param {ol.CenterConstraintType} centerConstraint Center constraint.
|
||||
* @param {ol.ResolutionConstraintType} resolutionConstraint
|
||||
* Resolution constraint.
|
||||
* @param {ol.RotationConstraintType} rotationConstraint
|
||||
* Rotation constraint.
|
||||
*/
|
||||
ol.Constraints = function(resolutionConstraint, rotationConstraint) {
|
||||
ol.Constraints =
|
||||
function(centerConstraint, resolutionConstraint, rotationConstraint) {
|
||||
|
||||
/**
|
||||
* @type {ol.CenterConstraintType}
|
||||
*/
|
||||
this.center = centerConstraint;
|
||||
|
||||
/**
|
||||
* @type {ol.ResolutionConstraintType}
|
||||
|
||||
Reference in New Issue
Block a user