Get rid of olx.js and typedef.js typedefs for ol

This commit is contained in:
Andreas Hocevar
2018-03-08 18:42:57 +01:00
parent 8f0ffe2043
commit 95d6251dbb
198 changed files with 2262 additions and 2698 deletions

View File

@@ -3,6 +3,12 @@
*/
import {toRadians} from './math.js';
/**
* @typedef {function((number|undefined), number): (number|undefined)} Type
*/
/**
* @param {number|undefined} rotation Rotation.
* @param {number} delta Delta.
@@ -33,7 +39,7 @@ export function none(rotation, delta) {
/**
* @param {number} n N.
* @return {ol.RotationConstraintType} Rotation constraint.
* @return {module:ol/rotationconstraint~Type} Rotation constraint.
*/
export function createSnapToN(n) {
const theta = 2 * Math.PI / n;
@@ -56,7 +62,7 @@ export function createSnapToN(n) {
/**
* @param {number=} opt_tolerance Tolerance.
* @return {ol.RotationConstraintType} Rotation constraint.
* @return {module:ol/rotationconstraint~Type} Rotation constraint.
*/
export function createSnapToZero(opt_tolerance) {
const tolerance = opt_tolerance || toRadians(5);