From 6428e1a6235d609ab28f8f3b6d1029b852d01c99 Mon Sep 17 00:00:00 2001 From: alyssaf16 Date: Sun, 29 Sep 2024 16:15:50 -0400 Subject: comparison box functionality --- src/client/views/nodes/ComparisonBox.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/client/views/nodes/ComparisonBox.tsx b/src/client/views/nodes/ComparisonBox.tsx index 8fbcb74cb..f05b672e9 100644 --- a/src/client/views/nodes/ComparisonBox.tsx +++ b/src/client/views/nodes/ComparisonBox.tsx @@ -234,7 +234,6 @@ export class ComparisonBox extends ViewBoxAnnotatableComponent() clearDoc = undoable((fieldKey: string) => { this.dataDoc[fieldKey] = undefined; - this._isEmpty = true; }, 'clear doc'); moveDoc = (doc: Doc, addDocument: (document: Doc | Doc[]) => boolean, which: string) => this.remDoc(doc, which) && addDocument(doc); @@ -716,6 +715,7 @@ export class ComparisonBox extends ViewBoxAnnotatableComponent() hideLinkButton pointerEvents={this.childActive ? undefined : returnNone} /> + {!this.Document._layout_isFlashcard ? clearButton(whichSlot) : null} ) : (
@@ -851,7 +851,7 @@ export class ComparisonBox extends ViewBoxAnnotatableComponent() left: `calc(${this.clipWidth + '%'} - 0.5px)`, cursor: this.clipWidth < 5 ? 'e-resize' : this.clipWidth / 100 > (this._props.PanelWidth() - 5) / this._props.PanelWidth() ? 'w-resize' : undefined, }} - onPointerDown={e => !this.childActive && this.registerSliding(e, this._props.PanelWidth() / 2)} /* if clicked, return slide-bar to center */ + onPointerDown={e => !this._isAnyChildContentActive && this.registerSliding(e, this._props.PanelWidth() / 2)} /* if clicked, return slide-bar to center */ >
-- cgit v1.2.3-70-g09d2