Snap rotation when within 5 degrees instead of 0.1 radians
This commit is contained in:
@@ -1,6 +1,8 @@
|
|||||||
goog.provide('ol.RotationConstraint');
|
goog.provide('ol.RotationConstraint');
|
||||||
goog.provide('ol.RotationConstraintType');
|
goog.provide('ol.RotationConstraintType');
|
||||||
|
|
||||||
|
goog.require('goog.math');
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @typedef {function((number|undefined), number): (number|undefined)}
|
* @typedef {function((number|undefined), number): (number|undefined)}
|
||||||
@@ -50,7 +52,7 @@ ol.RotationConstraint.createSnapToN = function(n) {
|
|||||||
* @return {ol.RotationConstraintType} Rotation constraint.
|
* @return {ol.RotationConstraintType} Rotation constraint.
|
||||||
*/
|
*/
|
||||||
ol.RotationConstraint.createSnapToZero = function(opt_tolerance) {
|
ol.RotationConstraint.createSnapToZero = function(opt_tolerance) {
|
||||||
var tolerance = opt_tolerance || 0.1;
|
var tolerance = opt_tolerance || goog.math.toRadians(5);
|
||||||
return (
|
return (
|
||||||
/**
|
/**
|
||||||
* @param {number|undefined} rotation Rotation.
|
* @param {number|undefined} rotation Rotation.
|
||||||
|
|||||||
Reference in New Issue
Block a user