Merge pull request #10504 from mike-000/patch-1
Fix for reset north when rotation is 360 degrees
This commit is contained in:
@@ -131,8 +131,9 @@ class Rotate extends Control {
|
|||||||
// upon it
|
// upon it
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (view.getRotation() !== undefined) {
|
const rotation = view.getRotation();
|
||||||
if (this.duration_ > 0) {
|
if (rotation !== undefined) {
|
||||||
|
if (this.duration_ > 0 && rotation % (2 * Math.PI) !== 0) {
|
||||||
view.animate({
|
view.animate({
|
||||||
rotation: 0,
|
rotation: 0,
|
||||||
duration: this.duration_,
|
duration: this.duration_,
|
||||||
|
|||||||
Reference in New Issue
Block a user