Commit b2a279fe by doszhang

dos

parent 6b510bbb
......@@ -191,7 +191,7 @@ $('input[name=signature]').attr('placeholder', '准备好了,就在此署名
//倒计时canvas定义
let canvasinfo = initCanvas('.countdown-canvas', '#countDownCanvas', 254, 251, true);
let canvasinfo = initCanvas('.countdown-canvas', 'countDownCanvas', 254, 251, true);
countDownCanvas = canvasinfo[0];
countDownCtx = canvasinfo[1];
......@@ -307,6 +307,7 @@ function showCountDownPage() {
my_notify('请填写名字');
return false;
}
$('.countdown-page').css('background', bgColor);
countDownCtx.fillStyle = bgColor;
countDownCtx.fillRect(0, 0, countDownCanvas.width, countDownCanvas.height);
$('.countdown-page').show();
......@@ -634,7 +635,7 @@ function initCanvas(target, id, canvasWidth, canvasHeight, useRem = false) {
canvasHeight = (canvasHeight / 20) * fontSize;
}
$(target).html('<canvas id="' + id + '" width="' + canvasWidth + '" height="' + canvasHeight + '"></canvas>');
canvas = $(id)[0];
canvas = $('#' + id)[0];
ctx = canvas.getContext("2d");
ctx.scale(2, 2);
canvas.width = canvasWidth;
......
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