应答器操作后显示调整

This commit is contained in:
joylink_fanyuhong 2024-02-05 08:59:15 +08:00
parent 63924eaaef
commit 9612b27c76
2 changed files with 24 additions and 2 deletions

View File

@ -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;

View File

@ -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'
);