stop current animation first in animateElement()
This commit is contained in:
parent
83dcc488dd
commit
291c3a3ec5
|
@ -119,7 +119,12 @@ function animateElement(
|
||||||
}
|
}
|
||||||
resolve();
|
resolve();
|
||||||
});
|
});
|
||||||
element.classList.add(className);
|
if (element.classList.contains(className)) {
|
||||||
|
element.classList.remove(className);
|
||||||
|
setTimeout(() => element.classList.add(className));
|
||||||
|
} else {
|
||||||
|
element.classList.add(className);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user