From d6a5d6cb9d2e7361ee463b2d9ce7c9173b5bfd93 Mon Sep 17 00:00:00 2001 From: lh_wang Date: Thu, 6 Aug 2015 15:53:36 +0800 Subject: [PATCH] fix canvas bug --- meitu/js/home/router.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/meitu/js/home/router.js b/meitu/js/home/router.js index 2cad042..04be715 100644 --- a/meitu/js/home/router.js +++ b/meitu/js/home/router.js @@ -8,6 +8,8 @@ define('home/router', function(require, exports, module) { canvas.width = 45; canvas.height = 220; + canvas.style.width = 45; + canvas.style.height = 220; //line ctx.beginPath(); @@ -31,7 +33,7 @@ define('home/router', function(require, exports, module) { ctx.beginPath(); ctx.fillStyle = '#4C4C4C'; - ctx.fillText(router[i].content, 2, 25 + 5 + i * 25); + ctx.fillText(router[i].content, 2, 25 + 3 + i * 25); ctx.closePath(); ctx.fill(); }