列车显示调整
This commit is contained in:
parent
95aff4919e
commit
1c30a77c43
@ -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; // 车号
|
||||
@ -209,12 +207,12 @@ export class TrainBody extends Container {
|
||||
fontSize: trainConsts.codeFontSize,
|
||||
};
|
||||
codeAGraph.style = styleA;
|
||||
const bodyAWH = codeAGraph.getLocalBounds();
|
||||
const bodyBWH = codeBGraph.getLocalBounds();
|
||||
codeAGraph.position.set(-bodyBWH.width / 2, 0);
|
||||
codeBGraph.position.set(bodyAWH.width / 2, 0);
|
||||
codeAGraph.updateOnScaled();
|
||||
codeBGraph.updateOnScaled();
|
||||
// const bodyAWH = codeAGraph.getLocalBounds();
|
||||
// const bodyBWH = codeBGraph.getLocalBounds();
|
||||
// codeAGraph.position.set(-bodyBWH.width / 2, 0);
|
||||
// codeBGraph.position.set(bodyAWH.width / 2, 0);
|
||||
// codeAGraph.updateOnScaled();
|
||||
// codeBGraph.updateOnScaled();
|
||||
const { width: codeWidth, height: codeHeight } = this.getBodyWH();
|
||||
codeRact.lineStyle(
|
||||
trainConsts.borderWidth,
|
||||
|
Loading…
Reference in New Issue
Block a user