From 8b77cb9005e236831bb31e75fa8b785d1d3d5fa9 Mon Sep 17 00:00:00 2001 From: River <382599512@qq.com> Date: Sun, 9 Aug 2020 11:07:43 +0800 Subject: [PATCH] Fix render line (#19) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 修改文档加入 npm 包 * 1.fix line func 属性没有转换为字符串 Co-authored-by: 葛欣 --- src/renderer/rendererFunc/listPoints.js | 2 +- src/renderer/rendererLine/listPoints.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/renderer/rendererFunc/listPoints.js b/src/renderer/rendererFunc/listPoints.js index d897c40..ef795d1 100644 --- a/src/renderer/rendererFunc/listPoints.js +++ b/src/renderer/rendererFunc/listPoints.js @@ -136,7 +136,7 @@ export default function listPoints(qrcode, params) { key="${id++}" d="${sq25}" stroke="${posColor}" - stroke-width=${(100 / 6) * (1 - (1 - 0.8) * 0.75)} + stroke-width="${(100 / 6) * (1 - (1 - 0.8) * 0.75)}" fill="none" transform="${ 'translate(' + diff --git a/src/renderer/rendererLine/listPoints.js b/src/renderer/rendererLine/listPoints.js index df266d9..8aa5376 100644 --- a/src/renderer/rendererLine/listPoints.js +++ b/src/renderer/rendererLine/listPoints.js @@ -178,9 +178,9 @@ export default function listPoints(qrcode, params) { opacity="${opacity}" x1="${x + 0.5}" y1="${y + 0.5}" - x2=${x + end - start - 0.5} + x2="${x + end - start - 0.5}" y2="${y + 0.5}" - stroke-width=${size} + stroke-width="${size}" stroke="${otherColor}" stroke-linecap="round" key="${id++}"