-
Notifications
You must be signed in to change notification settings - Fork 22
Expand file tree
/
Copy pathtransitionViewObject.ts
More file actions
57 lines (53 loc) · 1.7 KB
/
transitionViewObject.ts
File metadata and controls
57 lines (53 loc) · 1.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
import {Transition} from "../../../models/transition.model";
import {EditorView} from "./editor.view";
export class TransitionViewObject {
key: string;
constructor(
private editorView: EditorView,
public transition: Transition,
isMuted: boolean,
) {
this.key = TransitionViewObject.generateKey(editorView, transition, isMuted);
}
static generateKey(editorView: EditorView, transition: Transition, isMuted: boolean): string {
let key =
"LC" +
editorView.getNetzgrafikLoadCounter() +
"#" +
transition.getId() +
"@" +
transition.getIsNonStopTransit() +
"_" +
transition.getTrainrun().selected() +
"_" +
transition.getTrainrun().getTrainrunCategory().shortName +
"_" +
transition.getTrainrun().getTrainrunFrequency().shortName +
"_" +
transition.getTrainrun().getTrainrunTimeCategory().shortName +
"_" +
transition.getTrainrun().getTrainrunCategory().id +
"_" +
transition.getTrainrun().getTrainrunFrequency().id +
"_" +
transition.getTrainrun().getTrainrunTimeCategory().id +
"_" +
transition.getTrainrun().getTrainrunCategory().colorRef +
"_" +
transition.getTrainrun().getTrainrunFrequency().linePatternRef +
"_" +
transition.getTrainrun().getTrainrunTimeCategory().linePatternRef +
"_" +
transition.getTrainrun().getTrainrunFrequency().frequency +
"_" +
editorView.isTemporaryDisableFilteringOfItemsInViewEnabled() +
"_" +
isMuted +
"_" +
editorView.trainrunSectionPreviewLineView.getVariantIsWritable();
transition.getPath().forEach((p) => {
key += p.toString();
});
return key;
}
}