列车显示调整

This commit is contained in:
dong 2023-07-20 10:14:16 +08:00
parent 95aff4919e
commit 1c30a77c43

View File

@ -9,9 +9,7 @@ import {
calculateMirrorPoint, calculateMirrorPoint,
distance, distance,
} from 'src/jl-graphic'; } from 'src/jl-graphic';
import { AxleCounting } from '../axleCounting/AxleCounting';
import { SectionLink } from '../sectionLink/SectionLink'; import { SectionLink } from '../sectionLink/SectionLink';
import { Turnout } from '../turnout/Turnout';
export interface ITrainData extends GraphicData { export interface ITrainData extends GraphicData {
get code(): string; // 车号 get code(): string; // 车号
@ -209,12 +207,12 @@ export class TrainBody extends Container {
fontSize: trainConsts.codeFontSize, fontSize: trainConsts.codeFontSize,
}; };
codeAGraph.style = styleA; codeAGraph.style = styleA;
const bodyAWH = codeAGraph.getLocalBounds(); // const bodyAWH = codeAGraph.getLocalBounds();
const bodyBWH = codeBGraph.getLocalBounds(); // const bodyBWH = codeBGraph.getLocalBounds();
codeAGraph.position.set(-bodyBWH.width / 2, 0); // codeAGraph.position.set(-bodyBWH.width / 2, 0);
codeBGraph.position.set(bodyAWH.width / 2, 0); // codeBGraph.position.set(bodyAWH.width / 2, 0);
codeAGraph.updateOnScaled(); // codeAGraph.updateOnScaled();
codeBGraph.updateOnScaled(); // codeBGraph.updateOnScaled();
const { width: codeWidth, height: codeHeight } = this.getBodyWH(); const { width: codeWidth, height: codeHeight } = this.getBodyWH();
codeRact.lineStyle( codeRact.lineStyle(
trainConsts.borderWidth, trainConsts.borderWidth,