状态优先级调整
This commit is contained in:
parent
791857c1ba
commit
71a311142c
@ -101,7 +101,7 @@ export class LogicSectionOperationPlugin extends GraphicInteractionPlugin<LogicS
|
||||
|
||||
const state = {
|
||||
id: section.datas.code,
|
||||
ciOccupied: section.states.cbtcOccupied,
|
||||
ciOccupied: section.states.ciOccupied,
|
||||
cbtcOccupied: section.states.cbtcOccupied,
|
||||
locked: section.states.locked,
|
||||
failLocked: section.states.failLocked,
|
||||
|
@ -94,11 +94,10 @@ export class LogicSection extends JlGraphic implements ILineGraphic {
|
||||
}
|
||||
|
||||
let lineColor = SectionConsts.idleColor;
|
||||
|
||||
if (this.states.ciOccupied) {
|
||||
lineColor = SectionConsts.ciOccupiedColor;
|
||||
} else if (this.states.cbtcOccupied) {
|
||||
if (this.states.cbtcOccupied) {
|
||||
lineColor = SectionConsts.cbtcOccupiedColor;
|
||||
} else if (this.states.ciOccupied) {
|
||||
lineColor = SectionConsts.ciOccupiedColor;
|
||||
} else if (this.states.locked) {
|
||||
lineColor = SectionConsts.lockedColor;
|
||||
} else if (this.states.failLocked) {
|
||||
|
@ -201,7 +201,6 @@ class ForkGraphic extends Graphics {
|
||||
if (position === 'B') {
|
||||
this.moveTo(0, 0).lineTo(targetB.x, targetB.y);
|
||||
} else if (position === 'C') {
|
||||
console.log('reverse paint');
|
||||
this.moveTo(0, 0).lineTo(targetC.x, targetC.y);
|
||||
} else if (position === 'BOTH') {
|
||||
this.moveTo(targetB.x, targetB.y)
|
||||
@ -288,10 +287,10 @@ export class Turnout extends JlGraphic {
|
||||
|
||||
doRepaint(): void {
|
||||
//线条颜色
|
||||
if (this.states.ipSingleSwitchStusCiOccupied) {
|
||||
this.lineColor = TurnoutConsts.ciOccupiedColor;
|
||||
} else if (this.states.ipSingleSwitchStusCbtcOccupied) {
|
||||
if (this.states.ipSingleSwitchStusCbtcOccupied) {
|
||||
this.lineColor = TurnoutConsts.cbtcOccupiedColor;
|
||||
} else if (this.states.ipSingleSwitchStusCiOccupied) {
|
||||
this.lineColor = TurnoutConsts.ciOccupiedColor;
|
||||
} else if (this.states.ipSingleSwitchStusLocked) {
|
||||
this.lineColor = TurnoutConsts.lockedColor;
|
||||
} else if (this.states.ipSingleSwitchStusFailLocked) {
|
||||
|
Loading…
Reference in New Issue
Block a user