From 20a4348ffdb9a933c3473bae257567620aea2cd1 Mon Sep 17 00:00:00 2001
From: Junjie <DELL@qq.com>
Date: 星期二, 02 十二月 2025 09:26:31 +0800
Subject: [PATCH] #
---
src/main/webapp/views/watch/console2.html | 28 +++++++++++++++++++---------
1 files changed, 19 insertions(+), 9 deletions(-)
diff --git a/src/main/webapp/views/watch/console2.html b/src/main/webapp/views/watch/console2.html
index 7cf707c..9ae1c46 100644
--- a/src/main/webapp/views/watch/console2.html
+++ b/src/main/webapp/views/watch/console2.html
@@ -264,6 +264,12 @@
objectsContainer2 = new PIXI.Container();
pixiApp.stage.addChild(objectsContainer2);
+ pixiApp.stage.sortableChildren = true;
+ objectsContainer.sortableChildren = true;
+ objectsContainer2.sortableChildren = true;
+ objectsContainer.zIndex = 10;
+ objectsContainer2.zIndex = 20;
+
//*******************鎷栧姩鐢诲竷*******************
let stageOriginalPos;
let mouseDownPoint;
@@ -878,18 +884,20 @@
function createCrnTexture() {
const g = new PIXI.Graphics();
const yTop = Math.round(height * 0.1);
+ let deviceWidth = width * 2;
+
g.beginFill(0x999999);
g.drawRect(2, yTop, 3, height - yTop - 2);
- g.drawRect(width - 5, yTop, 3, height - yTop - 2);
+ g.drawRect(deviceWidth - 5, yTop, 3, height - yTop - 2);
g.endFill();
g.beginFill(0x999999);
- g.drawRect(0, yTop, width, 3);
+ g.drawRect(0, yTop, deviceWidth, 3);
g.endFill();
- const cabW = Math.round(width * 0.42);
+ const cabW = Math.round(deviceWidth * 0.68);
const cabH = Math.round(height * 0.38);
- const cabX = Math.round((width - cabW) / 2);
+ const cabX = Math.round((deviceWidth - cabW) / 2);
const cabY = Math.round(height * 0.52 - cabH / 2);
- g.beginFill(0x3a78c2);
+ g.beginFill(0x245a9a);
g.drawRect(cabX, cabY, cabW, cabH);
g.endFill();
const winW = Math.round(cabW * 0.6);
@@ -899,14 +907,14 @@
g.beginFill(0xd0e8ff);
g.drawRect(winX, winY, winW, winH);
g.endFill();
- const forkW = Math.round(width * 0.5);
+ const forkW = Math.round(deviceWidth * 0.8);
const forkH = Math.max(2, Math.round(height * 0.08));
- const forkX = Math.round((width - forkW) / 2);
+ const forkX = Math.round((deviceWidth - forkW) / 2);
const forkY = cabY + cabH;
g.beginFill(0x666666);
g.drawRect(forkX, forkY, forkW, forkH);
g.endFill();
- const rt = PIXI.RenderTexture.create({ width: width, height: height });
+ const rt = PIXI.RenderTexture.create({ width: deviceWidth, height: height });
pixiApp.renderer.render(g, rt);
return rt;
}
@@ -960,11 +968,12 @@
} else if (item.type == 'crn') {
if (getDeviceNo(value) == -1) {
sprite = new PIXI.Sprite(graphicsCrnTrack);
+ sprite.zIndex = 0;
} else {
sprite = new PIXI.Sprite(graphicsCrn);
const deviceNo = getDeviceNo(value);
const taskNo = getTaskNo(value);
- const style = new PIXI.TextStyle({ fontFamily: 'Arial', fontSize: 10, fill: '#000000' });
+ const style = new PIXI.TextStyle({ fontFamily: 'Arial', fontSize: 12, fill: '#ffffff', stroke: '#000000', strokeThickness: 2 });
const txt = taskNo > 0 ? (deviceNo + "(" + taskNo + ")") : String(deviceNo);
const text = new PIXI.Text(txt, style);
text.anchor.set(0.5);
@@ -972,6 +981,7 @@
sprite.addChild(text);
sprite.textObj = text;
pixiCrnMap.set(parseInt(deviceNo), sprite);
+ sprite.zIndex = 1;
}
} else {
return null;
--
Gitblit v1.9.1