Skip to content

Commit 664ab82

Browse files
committed
hack: adapt non-symmetry
Signed-off-by: Louis Greiner <[email protected]>
1 parent b288a01 commit 664ab82

File tree

7 files changed

+21
-16
lines changed

7 files changed

+21
-16
lines changed

src/app/models/trainrunsection.model.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ export class TrainrunSection {
5555
sourcePortId,
5656
targetNodeId,
5757
targetPortId,
58-
sourceSymmetry = true, // temporary, to allow migration of old trainrunSections from file
59-
targetSymmetry = true, // temporary, to allow migration of old trainrunSections from file
58+
sourceSymmetry = false, // temporary, to allow migration of old trainrunSections from file
59+
targetSymmetry = false, // temporary, to allow migration of old trainrunSections from file
6060
sourceDeparture,
6161
sourceArrival,
6262
targetDeparture,
@@ -75,8 +75,8 @@ export class TrainrunSection {
7575
sourcePortId: 0,
7676
targetNodeId: 0,
7777
targetPortId: 0,
78-
sourceSymmetry: true,
79-
targetSymmetry: true,
78+
sourceSymmetry: false,
79+
targetSymmetry: false,
8080
sourceDeparture: {
8181
time: 0,
8282
consecutiveTime: 0,

src/app/perlenkette/perlenkette-section/perlenkette-section.component.html

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,14 @@
2727
></path>
2828
<!-- Asymmetry arrows (asymmetric trainrun)-->
2929
<path
30-
*ngIf="shouldDisplayAsymmetryArrows('top')"
30+
*ngIf="false && shouldDisplayAsymmetryArrows('top')"
3131
[class]="getEdgeLineArrowClass()"
3232
d="M-1,-6 V0 H-8 L1,6 V0 H8 Z"
3333
[attr.transform]="getAsymmetryArrowTranslate(24)"
3434
[attr.hidden]="!filterService.isFilterAsymmetryArrowsEnabled() ? '' : null"
3535
></path>
3636
<path
37-
*ngIf="shouldDisplayAsymmetryArrows('bottom')"
37+
*ngIf="false && shouldDisplayAsymmetryArrows('bottom')"
3838
[class]="getEdgeLineArrowClass()"
3939
d="M-1,-6 V0 H-8 L1,6 V0 H8 Z"
4040
[attr.transform]="getAsymmetryArrowTranslate(169)"
@@ -294,14 +294,14 @@
294294
></path>
295295
<!-- Asymmetry arrows (asymmetric trainrun)-->
296296
<path
297-
*ngIf="shouldDisplayAsymmetryArrows('top')"
297+
*ngIf="false && shouldDisplayAsymmetryArrows('top')"
298298
[class]="getEdgeLineArrowClass()"
299299
d="M-1,-6 V0 H-8 L1,6 V0 H8 Z"
300300
[attr.transform]="getAsymmetryArrowTranslate(24)"
301301
[attr.hidden]="!filterService.isFilterAsymmetryArrowsEnabled() ? '' : null"
302302
></path>
303303
<path
304-
*ngIf="shouldDisplayAsymmetryArrows('bottom')"
304+
*ngIf="false && shouldDisplayAsymmetryArrows('bottom')"
305305
[class]="getEdgeLineArrowClass()"
306306
d="M-1,-6 V0 H-8 L1,6 V0 H8 Z"
307307
[attr.transform]="getAsymmetryArrowTranslate(169)"
@@ -447,7 +447,7 @@
447447

448448
<sbb-toggle-switch-button
449449
class="LeftSymmetryToggle"
450-
*ngIf="trainrunSection.getTrainrun().isRoundTrip()"
450+
*ngIf="false && trainrunSection.getTrainrun().isRoundTrip()"
451451
[checked]="!TrainrunsectionHelper.isLeftNodeSymmetric(trainrunSection)"
452452
(checkedChanged)="onLeftNodeSymmetryToggleChanged(!$event)"
453453
[disabled]="
@@ -728,7 +728,7 @@
728728
</div>
729729
<sbb-toggle-switch-button
730730
class="RightSymmetryToggle"
731-
*ngIf="trainrunSection.getTrainrun().isRoundTrip()"
731+
*ngIf="false && trainrunSection.getTrainrun().isRoundTrip()"
732732
[checked]="!TrainrunsectionHelper.isRightNodeSymmetric(trainrunSection)"
733733
(checkedChanged)="onRightNodeSymmetryToggleChanged(!$event)"
734734
[disabled]="
@@ -826,14 +826,14 @@
826826
></path>
827827
<!-- Asymmetry arrows (asymmetric trainrun)-->
828828
<path
829-
*ngIf="shouldDisplayAsymmetryArrows('top')"
829+
*ngIf="false && shouldDisplayAsymmetryArrows('top')"
830830
[class]="getEdgeLineArrowClass()"
831831
d="M-1,-6 V0 H-8 L1,6 V0 H8 Z"
832832
[attr.transform]="getAsymmetryArrowTranslate(24)"
833833
[attr.hidden]="!filterService.isFilterAsymmetryArrowsEnabled() ? '' : null"
834834
></path>
835835
<path
836-
*ngIf="shouldDisplayAsymmetryArrows('bottom')"
836+
*ngIf="false && shouldDisplayAsymmetryArrows('bottom')"
837837
[class]="getEdgeLineArrowClass()"
838838
d="M-1,-6 V0 H-8 L1,6 V0 H8 Z"
839839
[attr.transform]="getAsymmetryArrowTranslate(169)"

src/app/perlenkette/perlenkette.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@
152152
</div>
153153

154154
<sbb-toggle-switch-button
155-
*ngIf="!isSymmetric()"
155+
*ngIf="false && !isSymmetric()"
156156
[checked]="!isSymmetric()"
157157
(checkedChanged)="onTrainrunSymmetryToggleChanged()"
158158
#trainrunSymmetryToggle

src/app/services/data/trainrun.service.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,10 @@ export class TrainrunService {
270270
this.trainrunSectionService
271271
.getAllTrainrunSectionsForTrainrun(trainrun.getId())
272272
.forEach((ts: TrainrunSection) => ts.resetSymmetry());
273+
} else {
274+
this.trainrunSectionService
275+
.getAllTrainrunSectionsForTrainrun(trainrun.getId())
276+
.forEach((ts: TrainrunSection) => ts.setAsymmetry());
273277
}
274278
this.trainrunsUpdated();
275279
this.operation.emit(new TrainrunOperation(OperationType.update, trainrun));

src/app/view/dialogs/trainrun-and-section-dialog/trainrun-tab/trainrun-tab.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@
7070
<ng-container *ngIf="toolbarVisible">
7171
<div sbbDialogActions [class]="getContentFooterClassTag()">
7272
<sbb-toggle-switch-button
73-
*ngIf="!isSymmetric()"
73+
*ngIf="false && !isSymmetric()"
7474
style="margin-left: 10px; margin-right: auto"
7575
[checked]="!isSymmetric()"
7676
(checkedChanged)="onTrainrunSymmetryToggleChanged()"

src/app/view/dialogs/trainrun-and-section-dialog/trainrunsection-tab/trainrun-section-tab.component.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@
167167
</div>
168168
<sbb-toggle-switch-button
169169
class="LeftSymmetryToggle"
170-
*ngIf="selectedTrainrunSection.getTrainrun().isRoundTrip()"
170+
*ngIf="false && selectedTrainrunSection.getTrainrun().isRoundTrip()"
171171
[checked]="
172172
!trainrunSectionHelper.isLeftNextStopNodeSymmetric(
173173
selectedTrainrunSection,
@@ -244,7 +244,7 @@
244244
</div>
245245
<sbb-toggle-switch-button
246246
class="RightSymmetryToggle"
247-
*ngIf="selectedTrainrunSection.getTrainrun().isRoundTrip()"
247+
*ngIf="false && selectedTrainrunSection.getTrainrun().isRoundTrip()"
248248
[checked]="
249249
!trainrunSectionHelper.isRightNextStopNodeSymmetric(
250250
selectedTrainrunSection,

src/app/view/editor-main-view/data-views/trainrunsections.view.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1165,6 +1165,7 @@ export class TrainrunSectionsView {
11651165
connectedTrainIds: any,
11661166
enableEvents = true,
11671167
) {
1168+
return;
11681169
(["BEGINNING_ARROW", "ENDING_ARROW"] as const).forEach((arrowType) => {
11691170
groupLinesEnter
11701171
.append(StaticDomTags.EDGE_LINE_ARROW_SVG)

0 commit comments

Comments
 (0)