-
Notifications
You must be signed in to change notification settings - Fork 22
Expand file tree
/
Copy pathnodeViewObject.ts
More file actions
51 lines (48 loc) · 1.16 KB
/
nodeViewObject.ts
File metadata and controls
51 lines (48 loc) · 1.16 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
import {Node} from "../../../models/node.model";
import {EditorView} from "./editor.view";
export class NodeViewObject {
key: string;
constructor(
private editorView: EditorView,
public node: Node,
isNodeStopNode: boolean,
) {
this.key = NodeViewObject.generateKey(editorView, node, isNodeStopNode);
}
static generateKey(editorView: EditorView, n: Node, isNodeStopNode: boolean): string {
return (
"LC" +
editorView.getNetzgrafikLoadCounter() +
"#" +
n.getId() +
"@" +
n.getPositionX() +
"_" +
n.getPositionY() +
"_" +
n.getBetriebspunktName() +
"_" +
n.getPorts().length +
"_" +
n.getConnectionTime() +
"_" +
n.getNodeWidth() +
"_" +
n.getNodeHeight() +
"_" +
n.selected() +
"_" +
n.getConnections().length +
"_" +
isNodeStopNode +
"_" +
editorView.isJunctionNode(n) +
"_" +
editorView.isTemporaryDisableFilteringOfItemsInViewEnabled() +
"_" +
editorView.getLevelOfDetail() +
"_" +
editorView.trainrunSectionPreviewLineView.getVariantIsWritable()
);
}
}