|
@@ -172,7 +172,7 @@ const drawPlc = async (key, index, val, type) => {
|
|
const cfg_textInfo = ctx.measureText('配置按钮')
|
|
const cfg_textInfo = ctx.measureText('配置按钮')
|
|
ctx.fillText(
|
|
ctx.fillText(
|
|
'配置按钮',
|
|
'配置按钮',
|
|
- textDis,
|
|
|
|
|
|
+ textDis + 20 * ratioPixel,
|
|
l_r_dis + 16 * distance + cfg_textInfo.actualBoundingBoxAscent / 2 + r - 10 * 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('屏接口')
|
|
const screen_textInfo = ctx.measureText('屏接口')
|
|
ctx.fillText(
|
|
ctx.fillText(
|
|
'屏接口',
|
|
'屏接口',
|
|
- textDis,
|
|
|
|
|
|
+ textDis + 20 * ratioPixel,
|
|
l_r_dis + 18 * distance + screen_textInfo.actualBoundingBoxAscent / 2 + 40 * 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('指示灯')
|
|
const light1_textInfo = ctx.measureText('指示灯')
|
|
ctx.fillText(
|
|
ctx.fillText(
|
|
'指示灯',
|
|
'指示灯',
|
|
- textDis,
|
|
|
|
|
|
+ textDis + 20 * ratioPixel,
|
|
l_r_dis + 19 * distance + light1_textInfo.actualBoundingBoxAscent / 2 + 60 * 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('网口')
|
|
const rg45_textInfo = ctx.measureText('网口')
|
|
ctx.fillText(
|
|
ctx.fillText(
|
|
'网口',
|
|
'网口',
|
|
- textDis,
|
|
|
|
|
|
+ textDis +20 * ratioPixel,
|
|
l_r_dis + 21 * distance + rg45_textInfo.actualBoundingBoxAscent / 2 + (40 * ratioPixel) / 2 + 20
|
|
l_r_dis + 21 * distance + rg45_textInfo.actualBoundingBoxAscent / 2 + (40 * ratioPixel) / 2 + 20
|
|
)
|
|
)
|
|
// logo
|
|
// logo
|
|
@@ -269,12 +269,12 @@ const drawPlc = async (key, index, val, type) => {
|
|
l_r_dis + 20 * distance + b_textInfo.actualBoundingBoxAscent / 2
|
|
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)
|
|
const y = l_r_dis + distance * (index + 1)
|