View / removed the constrainRotation method

This commit is contained in:
jahow
2019-01-12 15:41:20 +01:00
committed by Olivier Guyot
parent e6c4b2ffd1
commit c2c1aa01d3
5 changed files with 7 additions and 31 deletions

View File

@@ -133,18 +133,6 @@ export function pan(view, delta, opt_duration) {
* @param {number=} opt_duration Duration.
*/
export function rotate(view, rotation, opt_anchor, opt_duration) {
rotation = view.constrainRotation(rotation, 0);
rotateWithoutConstraints(view, rotation, opt_anchor, opt_duration);
}
/**
* @param {import("../View.js").default} view View.
* @param {number|undefined} rotation Rotation.
* @param {import("../coordinate.js").Coordinate=} opt_anchor Anchor coordinate.
* @param {number=} opt_duration Duration.
*/
export function rotateWithoutConstraints(view, rotation, opt_anchor, opt_duration) {
if (rotation !== undefined) {
const currentRotation = view.getRotation();
const currentCenter = view.getCenter();