diff options
author | Kristóf Marussy <kristof@marussy.com> | 2021-10-31 15:02:16 +0100 |
---|---|---|
committer | Kristóf Marussy <kristof@marussy.com> | 2021-10-31 19:26:15 +0100 |
commit | 36a2f8a6e0c19f728ddd8e88ccd45fa2a7aea283 (patch) | |
tree | 6f27bf231184646287bb502e0533f7f16e2db026 /language-web/src/main/js/editor | |
parent | fix(web): undo/redo button accessibility issue (diff) | |
download | refinery-36a2f8a6e0c19f728ddd8e88ccd45fa2a7aea283.tar.gz refinery-36a2f8a6e0c19f728ddd8e88ccd45fa2a7aea283.tar.zst refinery-36a2f8a6e0c19f728ddd8e88ccd45fa2a7aea283.zip |
chore(web): refactor xtext client
Diffstat (limited to 'language-web/src/main/js/editor')
-rw-r--r-- | language-web/src/main/js/editor/EditorStore.ts | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/language-web/src/main/js/editor/EditorStore.ts b/language-web/src/main/js/editor/EditorStore.ts index 8788e00f..ba31efcb 100644 --- a/language-web/src/main/js/editor/EditorStore.ts +++ b/language-web/src/main/js/editor/EditorStore.ts | |||
@@ -56,11 +56,11 @@ import { XtextClient } from '../xtext/XtextClient'; | |||
56 | const log = getLogger('editor.EditorStore'); | 56 | const log = getLogger('editor.EditorStore'); |
57 | 57 | ||
58 | export class EditorStore { | 58 | export class EditorStore { |
59 | themeStore; | 59 | private readonly themeStore; |
60 | 60 | ||
61 | state: EditorState; | 61 | state: EditorState; |
62 | 62 | ||
63 | client: XtextClient; | 63 | private readonly client: XtextClient; |
64 | 64 | ||
65 | showLineNumbers = false; | 65 | showLineNumbers = false; |
66 | 66 | ||
@@ -74,11 +74,11 @@ export class EditorStore { | |||
74 | 74 | ||
75 | infoCount = 0; | 75 | infoCount = 0; |
76 | 76 | ||
77 | readonly defaultDispatcher = (tr: Transaction): void => { | 77 | private readonly defaultDispatcher = (tr: Transaction): void => { |
78 | this.onTransaction(tr); | 78 | this.onTransaction(tr); |
79 | }; | 79 | }; |
80 | 80 | ||
81 | dispatcher = this.defaultDispatcher; | 81 | private dispatcher = this.defaultDispatcher; |
82 | 82 | ||
83 | constructor(initialValue: string, themeStore: ThemeStore) { | 83 | constructor(initialValue: string, themeStore: ThemeStore) { |
84 | this.themeStore = themeStore; | 84 | this.themeStore = themeStore; |
@@ -148,10 +148,7 @@ export class EditorStore { | |||
148 | }, | 148 | }, |
149 | ); | 149 | ); |
150 | makeAutoObservable(this, { | 150 | makeAutoObservable(this, { |
151 | themeStore: false, | ||
152 | state: observable.ref, | 151 | state: observable.ref, |
153 | defaultDispatcher: false, | ||
154 | dispatcher: false, | ||
155 | }); | 152 | }); |
156 | } | 153 | } |
157 | 154 | ||