Merge branch 'master' of git.code.tencent.com:xian-ncc-da/xian-ncc-da-client

This commit is contained in:
Yuan 2023-06-09 16:53:56 +08:00
commit 410e129a8b

View File

@ -5,7 +5,7 @@ import {
JlGraphicTemplate,
VectorText,
} from 'src/jl-graphic';
import { LampBody } from './LampBody';
import { LampMainBody } from './LampMainBody';
import { drawArrow } from '../CommonGraphics';
export interface ISignalData extends GraphicData {
@ -35,7 +35,7 @@ export class Signal extends JlGraphic {
codeGraph: VectorText = new VectorText('');
humanControl: Graphics = new Graphics();
fleetMode: Graphics = new Graphics();
lampBody: LampBody = new LampBody();
lampMainBody: LampMainBody = new LampMainBody();
constructor() {
super(Signal.Type);
@ -43,7 +43,7 @@ export class Signal extends JlGraphic {
this.addChild(this.codeGraph);
this.addChild(this.humanControl);
this.addChild(this.fleetMode);
this.addChild(this.lampBody);
this.addChild(this.lampMainBody);
}
get datas(): ISignalData {
@ -51,7 +51,7 @@ export class Signal extends JlGraphic {
}
paint(): void {
this.lampBody.paint(signalConsts.lampNum);
this.lampMainBody.paint(signalConsts.lampNum);
this.humanControl.beginFill(SignalColorEnum.humanControlColor, 1);
if (this.humanControl.drawRegularPolygon) {
this.humanControl.drawRegularPolygon(-10, 0, 10, 3, Math.PI / 2);
@ -60,7 +60,7 @@ export class Signal extends JlGraphic {
this.fleetMode.beginFill(SignalColorEnum.fleetModeColor, 1);
drawArrow(
this.fleetMode,
this.lampBody.width + signalConsts.fleetModeLength,
this.lampMainBody.width + signalConsts.fleetModeLength,
0,
signalConsts.fleetModeLength,
signalConsts.fleetModeRadius,