diff options
author | alyssaf16 <alyssa_feinberg@brown.edu> | 2024-09-29 16:15:50 -0400 |
---|---|---|
committer | alyssaf16 <alyssa_feinberg@brown.edu> | 2024-09-29 16:15:50 -0400 |
commit | 6428e1a6235d609ab28f8f3b6d1029b852d01c99 (patch) | |
tree | b380fa2ad3002c9a59d8b5e5cfa28829277a0fba | |
parent | d9389cf288829bc8dd8c26a91693b1cfc4edacfb (diff) |
comparison box functionality
-rw-r--r-- | src/client/views/nodes/ComparisonBox.tsx | 4 |
1 files changed, 2 insertions, 2 deletions
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<FieldViewProps>() 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<FieldViewProps>() hideLinkButton pointerEvents={this.childActive ? undefined : returnNone} /> + {!this.Document._layout_isFlashcard ? clearButton(whichSlot) : null} </> ) : ( <div className="placeholder"> @@ -851,7 +851,7 @@ export class ComparisonBox extends ViewBoxAnnotatableComponent<FieldViewProps>() 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 */ > <div className="slide-handle" /> </div> |