Cleanup left over code from animation changes
This commit is contained in:
@@ -120,16 +120,8 @@ ol.control.Rotate.prototype.resetNorth_ = function() {
|
|||||||
// upon it
|
// upon it
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
var currentRotation = view.getRotation();
|
if (view.getRotation() !== undefined) {
|
||||||
if (currentRotation !== undefined) {
|
|
||||||
if (this.duration_ > 0) {
|
if (this.duration_ > 0) {
|
||||||
currentRotation = currentRotation % (2 * Math.PI);
|
|
||||||
if (currentRotation < -Math.PI) {
|
|
||||||
currentRotation += 2 * Math.PI;
|
|
||||||
}
|
|
||||||
if (currentRotation > Math.PI) {
|
|
||||||
currentRotation -= 2 * Math.PI;
|
|
||||||
}
|
|
||||||
view.animate({
|
view.animate({
|
||||||
rotation: 0,
|
rotation: 0,
|
||||||
duration: this.duration_,
|
duration: this.duration_,
|
||||||
|
|||||||
Reference in New Issue
Block a user