This commit is contained in:
fan 2023-07-06 11:24:41 +08:00
commit 0a2d5af597
2 changed files with 20 additions and 17 deletions

View File

@ -46,7 +46,7 @@ import {
TrainLine,
} from 'src/graphics/trainLine/TrainLine';
import { TrainLineDraw } from 'src/graphics/trainLine/TrainLineAssistant';
import { TrainLineData } from './graphics/TrainLineInteraction';
import { TrainLineData, TrainLineState } from './graphics/TrainLineInteraction';
import {
OneClickGenerateDraw,
OneClickGenerateTemplate,
@ -201,7 +201,10 @@ export function initDrawApp(dom: HTMLElement): JlDrawApp {
new StationLineDraw(app, new StationLineTemplate(new StationLineData())),
new RectDraw(app, new RectTemplate(new RectData())),
new RunLineDraw(app, new RunLineTemplate(new RunLineData())),
new TrainLineDraw(app, new ItrainLineTemplate(new TrainLineData())),
new TrainLineDraw(
app,
new ItrainLineTemplate(new TrainLineData(), new TrainLineState())
),
new PathLineDraw(app, new PathLineTemplate(new PathLineData())),
];
DrawRunLinePlugin.init(app);

View File

@ -277,21 +277,21 @@ class codeGraph extends Container {
if (stateData.downHold && stateData.downOccHold) {
this.character.style.fill = PlatformColorEnum.HCharRed;
}
//运行等级
if (stateData.nextSectionRunLevel) {
this.runLevel.visible = false;
this.runLevel.text = stateData.nextSectionRunLevel;
}
//运行时间
if (stateData.nextSectionRunTime) {
this.runTime.visible = true;
this.runTime.text = stateData.nextSectionRunTime;
}
//停站时间
if (stateData.stopTime) {
this.stopTime.visible = true;
this.stopTime.text = stateData.stopTime;
}
}
//运行等级
if (stateData.nextSectionRunLevel) {
this.runLevel.visible = false;
this.runLevel.text = stateData.nextSectionRunLevel;
}
//运行时间
if (stateData.nextSectionRunTime) {
this.runTime.visible = true;
this.runTime.text = stateData.nextSectionRunTime;
}
//停站时间
if (stateData.stopTime) {
this.stopTime.visible = true;
this.stopTime.text = stateData.stopTime;
}
}
}