diff options
author | bobzel <zzzman@gmail.com> | 2024-10-17 17:19:11 -0400 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2024-10-17 17:19:11 -0400 |
commit | dd93f5175064850c6c0e47f025cd7bbba1f23106 (patch) | |
tree | 5cf3a58309ad7a50c48b7d2b4ce7766283b713f2 /src/client/views/nodes/ComparisonBox.tsx | |
parent | 5be52fc8cef3140836e0663e7f13e620597cf9e7 (diff) |
fixed quizMode to actually render and to get pointer events.
Diffstat (limited to 'src/client/views/nodes/ComparisonBox.tsx')
-rw-r--r-- | src/client/views/nodes/ComparisonBox.tsx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/client/views/nodes/ComparisonBox.tsx b/src/client/views/nodes/ComparisonBox.tsx index 3c126ea4a..f6c33d6ba 100644 --- a/src/client/views/nodes/ComparisonBox.tsx +++ b/src/client/views/nodes/ComparisonBox.tsx @@ -792,8 +792,9 @@ export class ComparisonBox extends ViewBoxAnnotatableComponent<FieldViewProps>() const renderMode = new Map<flashcardRevealOp, () => JSX.Element>([ [flashcardRevealOp.FLIP, this.renderAsFlip], [flashcardRevealOp.SLIDE, this.renderAsBeforeAfter]]); // prettier-ignore - if (this.isQuizMode) this.renderAsQuiz(this.frontText); - return ( + return this.isQuizMode ? ( + this.renderAsQuiz(this.frontText) + ) : ( <div className="comparisonBox" style={{ pointerEvents: this._props.isContentActive() && !this.Document[Animation] ? 'unset' : undefined }} onContextMenu={this.flashcardContextMenu}> {renderMode.get(this.revealOp)?.() ?? null} {this.loading ? ( |