From 7ddd4cf191bbad04f31d02658beb956bcb2169e3 Mon Sep 17 00:00:00 2001 From: CPunisher <1343316114@qq.com> Date: Thu, 14 May 2020 20:31:21 +0800 Subject: [PATCH] [Style res image] --- src/components/renderer/RendererResImage.js | 14 +++++++------- src/utils/util.js | 4 ++-- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/components/renderer/RendererResImage.js b/src/components/renderer/RendererResImage.js index d976b80..3d86b49 100644 --- a/src/components/renderer/RendererResImage.js +++ b/src/components/renderer/RendererResImage.js @@ -13,12 +13,12 @@ function listPoints(qrcode, params) { let id = 0; for (let x = 0; x < nCount; x++) { for (let y = 0; y < nCount; y++) { - const posX = 3 * x + 1, posY = 3 * y + 1; + const posX = 3 * x, posY = 3 * y; if (typeTable[x][y] == QRPointType.ALIGN_CENTER || typeTable[x][y] == QRPointType.ALIGN_OTHER || typeTable[x][y] == QRPointType.TIMING) { if (qrcode.isDark(x, y)) { - pointList.push() + pointList.push() } else { - pointList.push() + pointList.push() } } else if (typeTable[x][y] == QRPointType.POS_CENTER) { if (qrcode.isDark(x, y)) { @@ -32,9 +32,9 @@ function listPoints(qrcode, params) { } } else { if (qrcode.isDark(x, y)) { - pointList.push() + pointList.push() } else { - pointList.push() + pointList.push() } } } @@ -67,8 +67,8 @@ const RendererResImage = ({qrcode, params, setParamInfo}) => { const [gpl, setGPL] = useState([]); useEffect(() => { - getGrayPointList(params[0], qrcode.getModuleCount(), "#B-black", "#B-white").then(res => setGPL(res)); - }, [params[0]]) + getGrayPointList(params[0], qrcode.getModuleCount(), "#S-black", "#S-white").then(res => setGPL(res)); + }, [params[0], qrcode]) return (