Animationsbug behiben

This commit is contained in:
silas
2018-09-18 13:55:57 +02:00
parent d029ea130b
commit f7f3a5c405
4 changed files with 8 additions and 4 deletions

File diff suppressed because one or more lines are too long

View File

@@ -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");