站台状态
This commit is contained in:
parent
537cc9981a
commit
20c03dc4be
@ -234,6 +234,8 @@ const PlatformOperateMenu: ContextMenu = ContextMenu.init({
|
||||
removeHoldrConfig,
|
||||
skipStopConfig,
|
||||
removeSkipStopConfig,
|
||||
dockTimeConfig,
|
||||
operatingLevelConfig,
|
||||
],
|
||||
},
|
||||
],
|
||||
@ -310,6 +312,14 @@ export class PlatformOperateInteraction extends GraphicInteractionPlugin<Platfor
|
||||
platform.states.upSkipstop = false;
|
||||
platform.doRepaint();
|
||||
};
|
||||
dockTimeConfig.handler = () => {
|
||||
platform.states.stopTime = 30;
|
||||
platform.doRepaint();
|
||||
};
|
||||
operatingLevelConfig.handler = () => {
|
||||
platform.states.nextSectionRunLevel = 2;
|
||||
platform.doRepaint();
|
||||
};
|
||||
|
||||
PlatformOperateMenu.open(e.global);
|
||||
}
|
||||
|
@ -101,7 +101,7 @@ export class rectGraphic extends Container {
|
||||
fillColor = PlatformColorEnum.yellow;
|
||||
}
|
||||
if (state.upSkipstop || state.downSkipstop) {
|
||||
fillColor = PlatformColorEnum.blue;
|
||||
fillColor = PlatformColorEnum.grey;
|
||||
}
|
||||
rectGraphic.lineStyle(platformConsts.lineWidth, new Color(fillColor));
|
||||
rectGraphic.beginFill(fillColor, 1);
|
||||
@ -207,12 +207,12 @@ class codeGraph extends Container {
|
||||
const runLevel = this.runLevel;
|
||||
runLevel.anchor.set(0.5);
|
||||
runLevel.position.set(
|
||||
platformConsts.width / 2 +
|
||||
platformConsts.lineWidth / 2 +
|
||||
3 * platformConsts.besideSpacing,
|
||||
-platformConsts.besideSpacing
|
||||
-platformConsts.width / 2 -
|
||||
platformConsts.lineWidth / 2 -
|
||||
platformConsts.besideSpacing,
|
||||
(-platformConsts.height * 4) / 5
|
||||
);
|
||||
runLevel.style.fill = PlatformColorEnum.whiteNumbers;
|
||||
runLevel.style.fill = PlatformColorEnum.yellow;
|
||||
//区间运行时间
|
||||
const runTime = this.runTime;
|
||||
runTime.anchor.set(0.5);
|
||||
@ -227,10 +227,10 @@ class codeGraph extends Container {
|
||||
const stopTime = this.stopTime;
|
||||
stopTime.anchor.set(0.5);
|
||||
stopTime.position.set(
|
||||
platformConsts.width / 2 +
|
||||
platformConsts.lineWidth / 2 +
|
||||
-platformConsts.width / 2 -
|
||||
platformConsts.lineWidth / 2 -
|
||||
platformConsts.besideSpacing,
|
||||
platformConsts.besideSpacing
|
||||
0
|
||||
);
|
||||
stopTime.style.fill = PlatformColorEnum.whiteNumbers;
|
||||
//跳停
|
||||
@ -287,12 +287,12 @@ class codeGraph extends Container {
|
||||
}
|
||||
//运行等级
|
||||
if (stateData.nextSectionRunLevel) {
|
||||
this.runLevel.visible = false;
|
||||
this.runLevel.visible = true;
|
||||
this.runLevel.text = stateData.nextSectionRunLevel;
|
||||
}
|
||||
//运行时间
|
||||
if (stateData.nextSectionRunTime) {
|
||||
this.runTime.visible = true;
|
||||
this.runTime.visible = false;
|
||||
this.runTime.text = stateData.nextSectionRunTime;
|
||||
}
|
||||
//停站时间
|
||||
|
Loading…
Reference in New Issue
Block a user