فهرست منبع

修改部分位置

一只小菜杨 1 ماه پیش
والد
کامیت
c3cb831f46
1فایلهای تغییر یافته به همراه10 افزوده شده و 10 حذف شده
  1. 10 10
      src/utils/worker.js

+ 10 - 10
src/utils/worker.js

@@ -172,7 +172,7 @@ const drawPlc = async (key, index, val, type) => {
     const cfg_textInfo = ctx.measureText('配置按钮')
     ctx.fillText(
       '配置按钮',
-      textDis,
+      textDis + 20 * ratioPixel,
       l_r_dis + 16 * distance + cfg_textInfo.actualBoundingBoxAscent / 2 + r - 10 * ratioPixel
     )
     // 屏接口
@@ -184,7 +184,7 @@ const drawPlc = async (key, index, val, type) => {
     const screen_textInfo = ctx.measureText('屏接口')
     ctx.fillText(
       '屏接口',
-      textDis,
+      textDis + 20 * ratioPixel,
       l_r_dis + 18 * distance + screen_textInfo.actualBoundingBoxAscent / 2 + 40 * ratioPixel
     )
     // 指示灯
@@ -196,7 +196,7 @@ const drawPlc = async (key, index, val, type) => {
     const light1_textInfo = ctx.measureText('指示灯')
     ctx.fillText(
       '指示灯',
-      textDis,
+      textDis + 20 * ratioPixel,
       l_r_dis + 19 * distance + light1_textInfo.actualBoundingBoxAscent / 2 + 60 * ratioPixel
     )
     // 网口
@@ -208,7 +208,7 @@ const drawPlc = async (key, index, val, type) => {
     const rg45_textInfo = ctx.measureText('网口')
     ctx.fillText(
       '网口',
-      textDis,
+      textDis +20 * ratioPixel,
       l_r_dis + 21 * distance + rg45_textInfo.actualBoundingBoxAscent / 2 + (40 * ratioPixel) / 2 + 20
     )
     // logo
@@ -269,12 +269,12 @@ const drawPlc = async (key, index, val, type) => {
       l_r_dis + 20 * distance + b_textInfo.actualBoundingBoxAscent / 2
     )
 
-    const tip_textInfo = ctx.measureText('当前plc系统时间')
-    ctx.fillText(
-      `当前plc系统时间`,
-      canvasMsg.width / 2 - tip_textInfo.width / 2,
-      20 * ratioPixel + tip_textInfo.actualBoundingBoxAscent
-    )
+    // const tip_textInfo = ctx.measureText('当前plc系统时间')
+    // ctx.fillText(
+    //   `当前plc系统时间`,
+    //   canvasMsg.width / 2 - tip_textInfo.width / 2,
+    //   20 * ratioPixel + tip_textInfo.actualBoundingBoxAscent
+    // )
   }
 
   const y = l_r_dis + distance * (index + 1)