aboutsummaryrefslogtreecommitdiffstats
path: root/subprojects/frontend/src/graph/GraphStore.ts
diff options
context:
space:
mode:
Diffstat (limited to 'subprojects/frontend/src/graph/GraphStore.ts')
-rw-r--r--subprojects/frontend/src/graph/GraphStore.ts12
1 files changed, 9 insertions, 3 deletions
diff --git a/subprojects/frontend/src/graph/GraphStore.ts b/subprojects/frontend/src/graph/GraphStore.ts
index ecb016b5..58c4422d 100644
--- a/subprojects/frontend/src/graph/GraphStore.ts
+++ b/subprojects/frontend/src/graph/GraphStore.ts
@@ -1,11 +1,12 @@
1/* 1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/> 2 * SPDX-FileCopyrightText: 2023-2024 The Refinery Authors <https://refinery.tools/>
3 * 3 *
4 * SPDX-License-Identifier: EPL-2.0 4 * SPDX-License-Identifier: EPL-2.0
5 */ 5 */
6 6
7import { makeAutoObservable, observable } from 'mobx'; 7import { makeAutoObservable, observable } from 'mobx';
8 8
9import type EditorStore from '../editor/EditorStore';
9import type { 10import type {
10 RelationMetadata, 11 RelationMetadata,
11 SemanticsSuccessResult, 12 SemanticsSuccessResult,
@@ -65,8 +66,9 @@ export default class GraphStore {
65 66
66 selectedSymbol: RelationMetadata | undefined; 67 selectedSymbol: RelationMetadata | undefined;
67 68
68 constructor() { 69 constructor(private readonly editorStore: EditorStore) {
69 makeAutoObservable(this, { 70 makeAutoObservable<GraphStore, 'editorStore'>(this, {
71 editorStore: false,
70 semantics: observable.ref, 72 semantics: observable.ref,
71 }); 73 });
72 } 74 }
@@ -184,4 +186,8 @@ export default class GraphStore {
184 }); 186 });
185 this.setSelectedSymbol(this.selectedSymbol); 187 this.setSelectedSymbol(this.selectedSymbol);
186 } 188 }
189
190 get colorNodes(): boolean {
191 return this.editorStore.colorIdentifiers;
192 }
187} 193}