File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed
Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -931,6 +931,29 @@ export class TrainrunService {
931931 return labelIDCauntMap ;
932932 }
933933
934+ isTrainrunTargetRightOrBottom ( ) : boolean {
935+ if ( ! this . getSelectedTrainrun ( ) ) {
936+ return false ;
937+ }
938+ const firstNode = this . getFirstTrainrunSection ( this . getSelectedTrainrun ( ) ) . getSourceNode ( ) ;
939+ const lastNode = this . getLastTrainrunSection ( this . getSelectedTrainrun ( ) ) . getTargetNode ( ) ;
940+ return GeneralViewFunctions . getRightOrBottomNode ( firstNode , lastNode ) === lastNode ;
941+ }
942+
943+ getLeftOrTopExtremitySection ( ) : TrainrunSection {
944+ if ( ! this . getSelectedTrainrun ( ) ) {
945+ return null ;
946+ }
947+
948+ const bothEndNodes = this . getBothEndNodesWithTrainrunId ( this . getSelectedTrainrun ( ) . getId ( ) ) ;
949+ const leftOrTopNode = GeneralViewFunctions . getLeftOrTopNode (
950+ bothEndNodes . endNode1 ,
951+ bothEndNodes . endNode2 ,
952+ ) ;
953+
954+ return leftOrTopNode . getExtremityTrainrunSection ( this . getSelectedTrainrun ( ) . getId ( ) ) ;
955+ }
956+
934957 getSbbArrowForTrainrunSectionDirection ( ) : string {
935958 if ( ! this . getSelectedTrainrun ( ) || this . getSelectedTrainrun ( ) . isRoundTrip ( ) ) {
936959 return "arrows-left-right-medium" ;
You can’t perform that action at this time.
0 commit comments