区段故障占用红色表示

This commit is contained in:
Yuan 2023-11-06 10:35:58 +08:00
parent 5664c875fb
commit 72f5f915c6

View File

@ -72,6 +72,7 @@ export interface ISectionState extends GraphicState {
export const SectionConsts = { export const SectionConsts = {
lineColor: '#5578b6', lineColor: '#5578b6',
occupiedColor: '#f00',
lineWidth: 5, lineWidth: 5,
}; };
@ -112,7 +113,9 @@ export class Section extends JlGraphic implements ILineGraphic {
this.lineGraphic.points = this.datas.points; this.lineGraphic.points = this.datas.points;
this.lineGraphic.lineStyle( this.lineGraphic.lineStyle(
SectionConsts.lineWidth, SectionConsts.lineWidth,
SectionConsts.lineColor this.states.occupied
? SectionConsts.occupiedColor
: SectionConsts.lineColor
); );
this.lineGraphic.paint(); this.lineGraphic.paint();
} }