From a760773be31c274af45a7d781160585d58d88c07 Mon Sep 17 00:00:00 2001 From: bobzel Date: Wed, 9 Oct 2024 23:43:59 -0400 Subject: changed flashcard revealOp to be set on collection, not individual flashcards --- src/client/views/nodes/ComparisonBox.tsx | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) (limited to 'src/client/views/nodes') diff --git a/src/client/views/nodes/ComparisonBox.tsx b/src/client/views/nodes/ComparisonBox.tsx index b86d61fdd..aed81709b 100644 --- a/src/client/views/nodes/ComparisonBox.tsx +++ b/src/client/views/nodes/ComparisonBox.tsx @@ -62,7 +62,7 @@ export class ComparisonBox extends ViewBoxAnnotatableComponent() @computed get clipWidthKey() { return `_${this._props.fieldKey}_clipWidth`; } // prettier-ignore @computed get clipWidth() { return NumCast(this.layoutDoc[this.clipWidthKey], 50); } // prettier-ignore @computed get clipHeight() { return NumCast(this.layoutDoc[this.clipHeightKey], 200); } // prettier-ignore - @computed get revealOp() { return StrCast(this.layoutDoc[this.revealOpKey]); } // prettier-ignore + @computed get revealOp() { return StrCast(this.layoutDoc[this.revealOpKey], StrCast(this._props.docViewPath().slice(-2)[0]?.Document.revealOp)); } // prettier-ignore set revealOp(value:string) { this.layoutDoc[this.revealOpKey] = value; } // prettier-ignore @computed get overlayAlternateIcon() { @@ -135,27 +135,12 @@ export class ComparisonBox extends ViewBoxAnnotatableComponent() )} - Hover to reveal}> -
- -
-
)} ); } - @action handleHover = () => { - if (this.revealOp === 'hover') { - this.revealOp = 'flip'; - this.Document.forceActive = false; - } else { - this.revealOp = 'hover'; - this.Document.forceActive = true; - } - }; - @action handleInputChange = (e: React.ChangeEvent) => { this._inputValue = e.target.value; }; -- cgit v1.2.3-70-g09d2