Commit 35877260 by doszhang

dos

parent 82f4d130
...@@ -874,7 +874,7 @@ function flagNoDraw(ctx, content, fontsize, color, x, y) { ...@@ -874,7 +874,7 @@ function flagNoDraw(ctx, content, fontsize, color, x, y) {
function flagTextDraw(ctx, content, fontsize, color, x, y) { function flagTextDraw(ctx, content, fontsize, color, x, y) {
let length = calculateStringLength(content); let length = calculateStringLength(content);
let lineTop = 0; let lineTop = 0;
if (length <= 28) { if (length <= 24) {
ctx.font = fontsize + 'px normal'; ctx.font = fontsize + 'px normal';
ctx.fillStyle = color; ctx.fillStyle = color;
ctx.fillText(content, x, y); ctx.fillText(content, x, y);
...@@ -882,8 +882,8 @@ function flagTextDraw(ctx, content, fontsize, color, x, y) { ...@@ -882,8 +882,8 @@ function flagTextDraw(ctx, content, fontsize, color, x, y) {
} else { } else {
let lineArr = []; let lineArr = [];
let lineNo = 0; let lineNo = 0;
for (let i = 0; i < content.length; i += 14) { for (let i = 0; i < content.length; i += 12) {
lineArr.push(content.substr(i, 14)); lineArr.push(content.substr(i, 12));
} }
for (let i = 0; i < lineArr.length; i++) { for (let i = 0; i < lineArr.length; i++) {
ctx.font = fontsize + 'px normal'; ctx.font = fontsize + 'px normal';
......
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