列车图例显示位置调整
This commit is contained in:
parent
c78ff9dda1
commit
6825eb02bd
@ -21,21 +21,17 @@ public class InOutBoundService implements CalculateDiagram{
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Optional<StationDiagram> calculate(Simulation simulation, TrainInfo trainInfo, VirtualRealityTrain train, SortDiagramStation diagramStation){
|
public Optional<StationDiagram> calculate(Simulation simulation, TrainInfo trainInfo, VirtualRealityTrain train, SortDiagramStation diagramStation){
|
||||||
if(trainInfo.isInbound()){
|
|
||||||
StationDiagram sd = new StationDiagram(train);
|
|
||||||
sd.setShowTrainDiagram(false);
|
|
||||||
return Optional.of(sd);
|
|
||||||
}
|
|
||||||
Station nextStation = train.getNextStation();
|
Station nextStation = train.getNextStation();
|
||||||
// SectionPosition headPos = train.getHeadPosition();
|
if(trainInfo.isInbound() || Objects.isNull(nextStation)){
|
||||||
SectionPosition tailPos = train.getTailPosition();
|
|
||||||
Station startStation = diagramStation.findFirstNotDepotStation(train.isRight());
|
|
||||||
if(Objects.isNull(nextStation)){
|
|
||||||
StationDiagram sd = new StationDiagram(train);
|
StationDiagram sd = new StationDiagram(train);
|
||||||
sd.setShowTrainDiagram(false);
|
sd.setShowTrainDiagram(false);
|
||||||
log.debug("列车[{}] 出库 方向[{}]",train.getGroupNumber(),train.isRight());
|
log.debug("列车[{}] 出库 方向[{}]",train.getGroupNumber(),train.isRight());
|
||||||
return Optional.of(sd);
|
return Optional.of(sd);
|
||||||
} else if(nextStation.isDepot() && !tailPos.getSection().isStandTrack()) {
|
}
|
||||||
|
// SectionPosition headPos = train.getHeadPosition();
|
||||||
|
SectionPosition tailPos = train.getTailPosition();
|
||||||
|
Station startStation = diagramStation.findFirstNotDepotStation(train.isRight());
|
||||||
|
if(nextStation.isDepot() && !tailPos.getSection().isStandTrack()) {
|
||||||
//列车入库,车尾离开站台轨
|
//列车入库,车尾离开站台轨
|
||||||
StationDiagram sd = new StationDiagram(train);
|
StationDiagram sd = new StationDiagram(train);
|
||||||
sd.setShowTrainDiagram(false);
|
sd.setShowTrainDiagram(false);
|
||||||
|
Loading…
Reference in New Issue
Block a user