diff options
author | bobzel <zzzman@gmail.com> | 2025-03-10 16:34:40 -0400 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2025-03-10 16:34:40 -0400 |
commit | ac704da36ae7d3535922f380535debedfcbb606f (patch) | |
tree | 780f965fbfd114f795783044ee348b01baaaefc3 /src | |
parent | 7e5ba63c3eb8bf36b3bbb81f46248766a7342d60 (diff) |
ignore python venv files. fix mobx assign in stylproviderquiz
Diffstat (limited to 'src')
-rw-r--r-- | src/client/views/StyleProviderQuiz.tsx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/client/views/StyleProviderQuiz.tsx b/src/client/views/StyleProviderQuiz.tsx index 0268771ff..4e845f9f5 100644 --- a/src/client/views/StyleProviderQuiz.tsx +++ b/src/client/views/StyleProviderQuiz.tsx @@ -19,6 +19,7 @@ import { ImageBox } from './nodes/ImageBox'; import { ImageUtility } from './nodes/imageEditor/imageEditorUtils/ImageHandler'; import './StyleProviderQuiz.scss'; import { Networking } from '../Network'; +import { runInAction } from 'mobx'; export namespace styleProviderQuiz { enum quizMode { @@ -83,14 +84,14 @@ export namespace styleProviderQuiz { imgBox.Document._quizMode = quiz; const quizBoxes = DocListCast(imgBox.Document.quizBoxes); if (!quizBoxes.length) { - imgBox.Loading = true; + runInAction(() => (imgBox.Loading = true)); const response = (await Networking.PostToServer('/labels', { file: i ? i : imgBox.paths[0], drag: i ? 'drag' : 'full', smart: quiz })) as { result: string }; const parsedResponse = JSON.parse(response.result.replace(/'/g, '"')); if (parsedResponse['boxes'].length != 0) { createBoxes(imgBox, parsedResponse['boxes'], parsedResponse['text']); } - imgBox.Loading = false; + runInAction(() => (imgBox.Loading = false)); } else quizBoxes.forEach(box => (box.hidden = false)); } |