diff --git a/src/graphics/sectionLink/SectionLink.ts b/src/graphics/sectionLink/SectionLink.ts index e9beb62..18b1bae 100644 --- a/src/graphics/sectionLink/SectionLink.ts +++ b/src/graphics/sectionLink/SectionLink.ts @@ -52,7 +52,7 @@ export class SectionLink extends JlGraphic implements ILineGraphic { lineGraphic: Graphics; labelGraphic: VectorText; divisionGraphic: Graphics = new Graphics(); - _linkLength = 0; + _linkLength = 0; // link长度 constructor() { super(SectionLink.Type); @@ -152,6 +152,7 @@ export class SectionLink extends JlGraphic implements ILineGraphic { this.updateData(old); } get linkLength(): number { + // 根据aSimRef和bSimRef获取link两侧公里标,计算link长度 if (!this._linkLength) { const queryStore = this.getGraphicApp().queryStore; const aSimDevice = queryStore.queryById(this.datas.aSimRef.id); diff --git a/src/graphics/train/Train.ts b/src/graphics/train/Train.ts index 6596c72..0aeb161 100644 --- a/src/graphics/train/Train.ts +++ b/src/graphics/train/Train.ts @@ -9,9 +9,7 @@ import { calculateMirrorPoint, distance, } from 'src/jl-graphic'; -import { AxleCounting } from '../axleCounting/AxleCounting'; import { SectionLink } from '../sectionLink/SectionLink'; -import { Turnout } from '../turnout/Turnout'; export interface ITrainData extends GraphicData { get code(): string; // 车号 @@ -106,9 +104,9 @@ export class TrainHead extends Container { this.pause.clear(); } doRepaint(states: ITrainState, bodyWH?: bodyWH) { - let direction = 'right'; + let direction = 'left'; if (states.up) { - direction = 'left'; + direction = 'right'; } this.clear(); if (!direction) {