lex 2 年之前
父節點
當前提交
840b384527
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      src/views/unit-test/model/keep-look-question/index.tsx

+ 2 - 2
src/views/unit-test/model/keep-look-question/index.tsx

@@ -300,8 +300,8 @@ export default defineComponent({
      */
     const drawLine = (ctx: any, startPoint: any, endPoint: any) => {
       ctx.beginPath()
-      // + 1 为了处理连线显示问题
-      ctx.moveTo(Math.ceil(startPoint.x + 1) * state.dpr, Math.ceil(startPoint.y) * state.dpr)
+      //  1 为了处理连线显示问题
+      ctx.moveTo(Math.floor(startPoint.x - 1) * state.dpr, Math.ceil(startPoint.y) * state.dpr)
       ctx.lineTo(Math.ceil(endPoint.x + 1) * state.dpr, Math.ceil(endPoint.y) * state.dpr)
       ctx.lineWidth = 2 * state.dpr
       ctx.strokeStyle = '#FF8057'