Commit 41272b77 by doszhang

dos

parent 5a3cef1d
...@@ -455,8 +455,8 @@ input[name=signature]::-webkit-input-placeholder { ...@@ -455,8 +455,8 @@ input[name=signature]::-webkit-input-placeholder {
} }
.countdown-num.animate { .countdown-num.animate {
animation: numScale 1s 0.05s linear 3 forwards; animation: numScale 1s 0s linear 3 forwards;
-webkit-animation: numScale 1s 0.05s linear 3 forwards; -webkit-animation: numScale 1s 0s linear 3 forwards;
} }
@keyframes numScale { @keyframes numScale {
......
...@@ -458,15 +458,15 @@ function countDown(callback) { ...@@ -458,15 +458,15 @@ function countDown(callback) {
timer = setInterval(function () { timer = setInterval(function () {
$('.countdown-num').text(countdown).addClass('animate'); $('.countdown-num').text(countdown).addClass('animate');
angle = ((angle * 10) + 36) / 10; 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(); countDownCtx.sector(countDownCanvas.width / 2, countDownCanvas.height / 2, countDownCanvas.width / 2, 0, angle).fill();
if (angle >= 0) { if (angle >= 0) {
countdown--; countdown--;
if (countdown == 0) { if (countdown == 0) {
clearInterval(timer); clearInterval(timer);
callback(); callback();
} else { } else {
countDownCtx.clearRect(0, 0, countDownCanvas.width, countDownCanvas.height);
angle = -360; angle = -360;
$('.countdown-num').text(countdown); $('.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