aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/ImageBox.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/views/nodes/ImageBox.tsx')
-rw-r--r--src/client/views/nodes/ImageBox.tsx12
1 files changed, 2 insertions, 10 deletions
diff --git a/src/client/views/nodes/ImageBox.tsx b/src/client/views/nodes/ImageBox.tsx
index 0b474076b..0827eb062 100644
--- a/src/client/views/nodes/ImageBox.tsx
+++ b/src/client/views/nodes/ImageBox.tsx
@@ -80,12 +80,12 @@ export class ImageBox extends ViewBoxAnnotatableComponent<FieldViewProps>() {
private _annotationLayer: React.RefObject<HTMLDivElement> = React.createRef();
imageRef: HTMLImageElement | null = null; // <video> ref
marqueeref = React.createRef<MarqueeAnnotator>();
+ @observable Loading = false; // bcz: this should be migrated into StylProviderQuiz since it's not fundamental to the imageBox
@observable private _searchInput = '';
@observable private _savedAnnotations = new ObservableMap<number, (HTMLDivElement & { marqueeing?: boolean })[]>();
@observable private _curSuffix = '';
@observable private _error = '';
- @observable private _loading = false;
@observable private _isHovering = false; // flag to switch between primary and alternate images on hover
constructor(props: FieldViewProps) {
@@ -98,14 +98,6 @@ export class ImageBox extends ViewBoxAnnotatableComponent<FieldViewProps>() {
this._dropDisposer?.();
ele && (this._dropDisposer = DragManager.MakeDropTarget(ele, this.drop.bind(this), this.Document));
};
-
- @computed get quizBoxes() {
- return DocListCast(this.Document.quizBoxes);
- }
- @computed get quizMode() {
- return StrCast(this.Document._quizMode);
- }
-
getAnchor = (addAsAnnotation: boolean, pinProps?: PinProps) => {
const visibleAnchor = this._getAnchor?.(this._savedAnnotations, true); // use marquee anchor, otherwise, save zoom/pan as anchor
const anchor =
@@ -562,7 +554,7 @@ export class ImageBox extends ViewBoxAnnotatableComponent<FieldViewProps>() {
addDocument={this.addDocument}>
{this.content}
</CollectionFreeFormView>
- {this._loading ? (
+ {this.Loading ? (
<div className="loading-spinner" style={{ position: 'absolute' }}>
<ReactLoading type="spin" height={50} width={50} color={'blue'} />
</div>