Add center constraint to ol.View2D

This commit is contained in:
Tom Payne
2013-06-17 16:47:20 +02:00
committed by Frederic Junod
parent 1c003b5ab1
commit 73b9b6b6a0
3 changed files with 37 additions and 3 deletions

View File

@@ -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}