列车调整
This commit is contained in:
parent
c120822467
commit
a59e51eafd
@ -144,6 +144,8 @@ class TrainBody extends Container {
|
||||
codeAGraph.position.set(-bodyBWH.width / 2, 0);
|
||||
codeBGraph.position.set(bodyAWH.width / 2, 0);
|
||||
}
|
||||
codeAGraph.updateOnScaled();
|
||||
codeBGraph.updateOnScaled();
|
||||
if (this.train.constDatas.hasBodyRact) {
|
||||
const bodyRact = this.bodyRact;
|
||||
const { width: bodyWidth, height: bodyHeight } = this.getBodyWH();
|
||||
@ -246,16 +248,17 @@ class Train extends JlGraphic {
|
||||
}
|
||||
// 设置驾驶模式对应颜色
|
||||
setDiriveModelColor(s) {
|
||||
const DiriveModelColorEnum = this.constDatas.DiriveModelColorEnum;
|
||||
let aColor = DiriveModelColorEnum.AM;
|
||||
let pColor = DiriveModelColorEnum.SM;
|
||||
const aModelColorEnum = this.constDatas.arrowDiriveModelColorEnum;
|
||||
const pModelColorEnum = this.constDatas.pauseDiriveModelColorEnum;
|
||||
let aColor = aModelColorEnum.AM;
|
||||
let pColor = pModelColorEnum.AM;
|
||||
if (s == EnumDiriveModel.SM) {
|
||||
aColor = DiriveModelColorEnum.SM;
|
||||
pColor = DiriveModelColorEnum.SM;
|
||||
aColor = aModelColorEnum.SM;
|
||||
pColor = pModelColorEnum.SM;
|
||||
}
|
||||
else if (s == EnumDiriveModel.RM) {
|
||||
aColor = DiriveModelColorEnum.RM;
|
||||
pColor = DiriveModelColorEnum.RM;
|
||||
aColor = aModelColorEnum.RM;
|
||||
pColor = pModelColorEnum.RM;
|
||||
}
|
||||
this.trainHead.arrowColor = aColor;
|
||||
this.trainHead.pauseColor = pColor;
|
||||
|
3
components/packages/Train/TrainConfig.d.ts
vendored
3
components/packages/Train/TrainConfig.d.ts
vendored
@ -15,7 +15,8 @@ export interface ITrainConstsConfig {
|
||||
borderColor: string;
|
||||
arrowDefaultColor: string;
|
||||
pauseDefaultColor: string;
|
||||
DiriveModelColorEnum: DiriveModelColor;
|
||||
arrowDiriveModelColorEnum: DiriveModelColor;
|
||||
pauseDiriveModelColorEnum: DiriveModelColor;
|
||||
typeColorEnum: TypeColor;
|
||||
statusTextColor: IStatusTextColor;
|
||||
statusTextTransform?: IStatusTextColor;
|
||||
|
@ -41,13 +41,20 @@ function getTrainConsts() {
|
||||
bodyBgColor: '0x737373', // body背景色
|
||||
arrowDefaultColor: '0x00FF00', // 箭头默认颜色
|
||||
pauseDefaultColor: '0x00FF00', // 停止默认颜色
|
||||
DiriveModelColorEnum: {
|
||||
arrowDiriveModelColorEnum: {
|
||||
AM: '0x00FF00', // ATO自动驾驶
|
||||
SM: '0xFFFF00', // ATP 监控下的人工驾驶模式
|
||||
RM: '0xFFC837', // 限制人工驾驶模式
|
||||
NRM: '0xA0522D', // 非限制人工驾驶模式
|
||||
red: '0xF80103', // 红色表示通信中断
|
||||
},
|
||||
pauseDiriveModelColorEnum: {
|
||||
AM: '0xFFFF00', // ATO自动驾驶
|
||||
SM: '0xFFFF00', // ATP 监控下的人工驾驶模式
|
||||
RM: '0xFFC837', // 限制人工驾驶模式
|
||||
NRM: '0xA0522D', // 非限制人工驾驶模式
|
||||
red: '0xF80103', // 红色表示通信中断
|
||||
},
|
||||
typeColorEnum: {
|
||||
accuracy: '0xffffff', // 准点
|
||||
early: '0x00FF00', // 早点
|
||||
|
@ -162,6 +162,8 @@ class TrainBody extends Container {
|
||||
codeAGraph.position.set(-bodyBWH.width / 2, 0);
|
||||
codeBGraph.position.set(bodyAWH.width / 2, 0);
|
||||
}
|
||||
codeAGraph.updateOnScaled();
|
||||
codeBGraph.updateOnScaled();
|
||||
if (this.train.constDatas.hasBodyRact) {
|
||||
const bodyRact = this.bodyRact;
|
||||
const { width: bodyWidth, height: bodyHeight } = this.getBodyWH();
|
||||
@ -282,15 +284,16 @@ export class Train extends JlGraphic {
|
||||
|
||||
// 设置驾驶模式对应颜色
|
||||
setDiriveModelColor(s: EnumDiriveModel) {
|
||||
const DiriveModelColorEnum = this.constDatas.DiriveModelColorEnum;
|
||||
let aColor = DiriveModelColorEnum.AM;
|
||||
let pColor = DiriveModelColorEnum.SM;
|
||||
const aModelColorEnum = this.constDatas.arrowDiriveModelColorEnum;
|
||||
const pModelColorEnum = this.constDatas.pauseDiriveModelColorEnum;
|
||||
let aColor = aModelColorEnum.AM;
|
||||
let pColor = pModelColorEnum.AM;
|
||||
if (s == EnumDiriveModel.SM) {
|
||||
aColor = DiriveModelColorEnum.SM;
|
||||
pColor = DiriveModelColorEnum.SM;
|
||||
aColor = aModelColorEnum.SM;
|
||||
pColor = pModelColorEnum.SM;
|
||||
} else if (s == EnumDiriveModel.RM) {
|
||||
aColor = DiriveModelColorEnum.RM;
|
||||
pColor = DiriveModelColorEnum.RM;
|
||||
aColor = aModelColorEnum.RM;
|
||||
pColor = pModelColorEnum.RM;
|
||||
}
|
||||
this.trainHead.arrowColor = aColor;
|
||||
this.trainHead.pauseColor = pColor;
|
||||
|
@ -16,7 +16,8 @@ export interface ITrainConstsConfig{
|
||||
borderColor: string; // 边框的颜色
|
||||
arrowDefaultColor: string; // 箭头默认颜色
|
||||
pauseDefaultColor: string; // 停止默认颜色
|
||||
DiriveModelColorEnum: DiriveModelColor;
|
||||
arrowDiriveModelColorEnum: DiriveModelColor;
|
||||
pauseDiriveModelColorEnum: DiriveModelColor;
|
||||
typeColorEnum: TypeColor;
|
||||
statusTextColor: IStatusTextColor;
|
||||
statusTextTransform?: IStatusTextColor; // 状态文字转换
|
||||
@ -87,13 +88,20 @@ export function getTrainConsts(): ITrainConstsConfig {
|
||||
bodyBgColor: '0x737373', // body背景色
|
||||
arrowDefaultColor: '0x00FF00', // 箭头默认颜色
|
||||
pauseDefaultColor: '0x00FF00', // 停止默认颜色
|
||||
DiriveModelColorEnum: { // 驾驶模式对应颜色
|
||||
arrowDiriveModelColorEnum: { // 箭头在驾驶模式对应颜色
|
||||
AM: '0x00FF00', // ATO自动驾驶
|
||||
SM: '0xFFFF00', // ATP 监控下的人工驾驶模式
|
||||
RM: '0xFFC837', // 限制人工驾驶模式
|
||||
NRM: '0xA0522D', // 非限制人工驾驶模式
|
||||
red: '0xF80103', // 红色表示通信中断
|
||||
},
|
||||
pauseDiriveModelColorEnum: { // 停止在驾驶模式对应颜色
|
||||
AM: '0xFFFF00', // ATO自动驾驶
|
||||
SM: '0xFFFF00', // ATP 监控下的人工驾驶模式
|
||||
RM: '0xFFC837', // 限制人工驾驶模式
|
||||
NRM: '0xA0522D', // 非限制人工驾驶模式
|
||||
red: '0xF80103', // 红色表示通信中断
|
||||
},
|
||||
typeColorEnum: { // 识别号颜色
|
||||
accuracy: '0xffffff', // 准点
|
||||
early: '0x00FF00', // 早点
|
||||
|
Loading…
Reference in New Issue
Block a user