Merge pull request #2931 from elemoine/viewdocs

Improvement to view docs
This commit is contained in:
Éric Lemoine
2014-11-10 13:47:12 +01:00
2 changed files with 11 additions and 4 deletions

View File

@@ -474,7 +474,9 @@ olx.ViewOptions.prototype.constrainRotation;
/** /**
* Enable rotation. Default is `true`. * Enable rotation. Default is `true`. If `false` a rotation constraint that
* always sets the rotation to zero is used. The `constrainRotation` option
* has no effect if `enableRotation` is `false`.
* @type {boolean|undefined} * @type {boolean|undefined}
* @api * @api
*/ */

View File

@@ -77,14 +77,19 @@ ol.ViewHint = {
* the "next" resolution. And releasing the fingers after pinch-zooming * the "next" resolution. And releasing the fingers after pinch-zooming
* snaps to the closest resolution (with an animation). * snaps to the closest resolution (with an animation).
* *
* So the *resolution constraint* snaps to specific resolutions. It is * The *resolution constraint* snaps to specific resolutions. It is
* determined by the following options: `resolutions`, `maxResolution`, * determined by the following options: `resolutions`, `maxResolution`,
* `maxZoom`, and `zoomFactor`. If `resolutions` is set, the other three * `maxZoom`, and `zoomFactor`. If `resolutions` is set, the other three
* options are ignored. See documentation for each option for more * options are ignored. See documentation for each option for more
* information. * information.
* *
* The *rotation constraint* is currently not configurable. It snaps the * The *rotation constraint* snaps to specific angles. It is determined
* rotation value to zero when approaching the horizontal. * by the following options: `enableRotation` and `constrainRotation`.
* By default the rotation value is snapped to zero when approaching the
* horizontal.
*
* The *center constraint* is determined by the `extent` option. By
* default the center is not constrained at all.
* *
* @constructor * @constructor
* @extends {ol.Object} * @extends {ol.Object}