Commit 6b510bbb by doszhang

dos

parent ee0a5c2e
...@@ -190,8 +190,8 @@ $('input[name=customize-flag]').attr('placeholder', '也能在这里写你的fla ...@@ -190,8 +190,8 @@ $('input[name=customize-flag]').attr('placeholder', '也能在这里写你的fla
$('input[name=signature]').attr('placeholder', '准备好了,就在此署名吧').attr('id', 'signature'); $('input[name=signature]').attr('placeholder', '准备好了,就在此署名吧').attr('id', 'signature');
//倒计时canvas定义 //倒计时canvas定义
$('.countdown-canvas').html('<canvas id="countDownCanvas" width="' + 254 + '" height="' + 251 + '"></canvas>');
let canvasinfo = initCanvas('#countDownCanvas', 254, 251); let canvasinfo = initCanvas('.countdown-canvas', '#countDownCanvas', 254, 251, true);
countDownCanvas = canvasinfo[0]; countDownCanvas = canvasinfo[0];
countDownCtx = canvasinfo[1]; countDownCtx = canvasinfo[1];
...@@ -342,6 +342,7 @@ function showSuggestPage() { ...@@ -342,6 +342,7 @@ function showSuggestPage() {
$('.personal-page .btn-tab-decorate').click(); $('.personal-page .btn-tab-decorate').click();
return false; return false;
} }
$('.flag-page').hide();
$('.suggest-page').css('background', bgColor); $('.suggest-page').css('background', bgColor);
$('.personal-page .personal-wrap').addClass('animate'); $('.personal-page .personal-wrap').addClass('animate');
$('.suggest-page').show(); $('.suggest-page').show();
...@@ -627,7 +628,12 @@ function fadeInTextUp(text, fadeTime, divName) { ...@@ -627,7 +628,12 @@ function fadeInTextUp(text, fadeTime, divName) {
}, 3000); }, 3000);
} }
function initCanvas(id, canvasWidth, canvasHeight) { function initCanvas(target, id, canvasWidth, canvasHeight, useRem = false) {
if (useRem) {
canvasWidth = (canvasWidth / 20) * fontSize;
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 = canvas.getContext("2d");
ctx.scale(2, 2); ctx.scale(2, 2);
......
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