Commit 377e8c37 by doszhang

dos

parent 5d1f7d0c
......@@ -400,7 +400,9 @@ function drawFlagItem(initialPosition) {
posterCtx.drawImage(noBg, pxToRem(105), top, pxToRem(44), pxToRem(39));
flagNoDraw(posterCtx, i + 1, 14, '#222222', pxToRem(129), top + pxToRem(28));
let lineTop = flagTextDraw(posterCtx, flagStack[i], 16, '#222222', pxToRem(167), textTop);
posterCtx.drawImage(redline, pxToRem(161), lineTop, pxToRem(367), pxToRem(20));
if (lineTop != 0) {
posterCtx.drawImage(redline, pxToRem(161), lineTop, pxToRem(367), pxToRem(20));
}
}
}
......@@ -876,7 +878,7 @@ function flagTextDraw(ctx, content, fontsize, color, x, y) {
ctx.font = fontsize + 'px normal';
ctx.fillStyle = color;
ctx.fillText(content, x, y);
lineTop = y + 20;
lineTop = y + 5;
} else {
let lineArr = [];
let lineNo = 0;
......@@ -890,10 +892,11 @@ function flagTextDraw(ctx, content, fontsize, color, x, y) {
lineNo++;
if (i == lineArr.length - 1) {
lineTop = y + (lineNo * (fontsize + 10)) + 20;
lineTop = 0;
}
}
}
return lineTop
return lineTop;
}
function calculateStringLength(str) {
......
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