Commit 45e08480 by doszhang

dos

parent 680c2645
......@@ -323,19 +323,19 @@ function countDown(callback) {
let angle = -360;
let countdown = 3;
let timer;
$('.countdown-num').text(countdown);
$('.countdown-num').text(countdown).addClass('animate');
countDownCtx.fillStyle = bgColor;
timer = setInterval(function () {
angle = ((angle * 10) + 36) / 10;
countDownCtx.clearRect(0, 0, countDownCanvas.width, countDownCanvas.height);
countDownCtx.sector(countDownCanvas.width / 2, countDownCanvas.height / 2, countDownCanvas.width / 2, 0, angle).fill();
console.log(angle);
if (angle >= 0) {
countdown--;
if (countdown == 0) {
clearInterval(timer);
$('.countdown-num').removeClass('animate');
callback();
} else {
angle = -360;
$('.countdown-num').text(countdown);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment