Animationsbug behiben
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -4677,6 +4677,8 @@ class ParentSegment extends Segment {
|
||||
}
|
||||
|
||||
async rotate() {
|
||||
let timeout = 1250;
|
||||
|
||||
if (!this.getLevel().getHasWon()) {
|
||||
this.rotation += 90;
|
||||
this.rotation %= 360;
|
||||
@@ -4688,7 +4690,7 @@ class ParentSegment extends Segment {
|
||||
|
||||
let self = this;
|
||||
let delayPromise = new Promise(function (resolve) {
|
||||
setTimeout(resolve, 250);
|
||||
setTimeout(resolve, timeout);
|
||||
}).then(() => {
|
||||
if (self.rotation === currentRotation) {
|
||||
self.element.classList.remove("rotating");
|
||||
|
||||
Reference in New Issue
Block a user