应答器操作后显示调整
This commit is contained in:
parent
63924eaaef
commit
9612b27c76
@ -39,6 +39,8 @@ export interface TrainEnd {
|
||||
* @param devicePort 道岔的端口
|
||||
* @param headOffset 偏移量(区段从A端为偏移原点,道岔从岔芯为偏移原点)
|
||||
* @param trainLength 列车总长
|
||||
* @param trainId 列车编号
|
||||
* @param trainSpeed 列车初始速度
|
||||
*/
|
||||
export async function addTrain(data: {
|
||||
simulationId: string;
|
||||
@ -89,6 +91,17 @@ export async function removeTrain(data: {
|
||||
return response.data;
|
||||
}
|
||||
|
||||
/**
|
||||
* 清除所有列车
|
||||
*/
|
||||
export async function removeAllTrain(data: {
|
||||
simulationId: string;
|
||||
mapId: number;
|
||||
}) {
|
||||
const response = await api.post(`${UriBase}/train/remove/all`, data);
|
||||
return response.data;
|
||||
}
|
||||
|
||||
export async function setAxleSectionState(data: {
|
||||
simulationId: string;
|
||||
mapId: number;
|
||||
|
@ -151,7 +151,7 @@ export class TransponderCode extends Container {
|
||||
this.addChild(this.codeText);
|
||||
}
|
||||
setVectorFontSize(fontSize: number) {
|
||||
this.codeText.setVectorFontSize(fontSize)
|
||||
this.codeText.setVectorFontSize(fontSize);
|
||||
}
|
||||
|
||||
clear() {
|
||||
@ -211,7 +211,16 @@ export class Transponder extends JlGraphic {
|
||||
});
|
||||
polygonGraphic.endFill;
|
||||
this.labelGraphic.paint(this.datas);
|
||||
this.labelGraphic.codeText.style.fill = lineColor;
|
||||
let textColor = '#ff0000';
|
||||
if (
|
||||
this.states.km &&
|
||||
this.states.km.kilometer === this.datas.kilometerSystem.kilometer &&
|
||||
this.states.fixedTelegram === this.datas.fixedTelegram &&
|
||||
this.states.fixedUserTelegram === this.datas.fixedUserTelegram
|
||||
) {
|
||||
textColor = '#ffffff';
|
||||
}
|
||||
this.labelGraphic.codeText.style.fill = textColor;
|
||||
const codeTransform = this.datas?.childTransforms?.find(
|
||||
(item) => item.name === 'transponderCode'
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user