Animationsbug behiben
This commit is contained in:
parent
d029ea130b
commit
f7f3a5c405
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");
|
||||
|
||||
@ -50,6 +50,8 @@ export class ParentSegment extends Segment {
|
||||
}
|
||||
|
||||
async rotate() {
|
||||
let timeout = 250;
|
||||
|
||||
if (!this.getLevel().getHasWon()) {
|
||||
this.rotation += 90;
|
||||
this.rotation %= 360;
|
||||
@ -61,7 +63,7 @@ export 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");
|
||||
|
||||
@ -28,7 +28,6 @@ $animationDuration: 0.25s;
|
||||
&.rotating {
|
||||
z-index: 10 !important;
|
||||
overflow: hidden;
|
||||
vertical-align: top;
|
||||
|
||||
@for $i from 1 through length($rotationDegrees) {
|
||||
&.rotate-#{nth($rotationDegrees, $i)} {
|
||||
@ -108,6 +107,7 @@ $animationDuration: 0.25s;
|
||||
}
|
||||
|
||||
.segment {
|
||||
vertical-align: top;
|
||||
white-space: initial;
|
||||
cursor: pointer;
|
||||
display: inline-block;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user