From 73f709846365cb266c8489678d5c6713c0c43158 Mon Sep 17 00:00:00 2001 From: alyssaf16 Date: Tue, 5 Mar 2024 17:23:33 -0500 Subject: difference between flashcard and comparison node --- src/client/views/nodes/ComparisonBox.tsx | 38 ++++++++++++---------- src/client/views/nodes/DocumentView.tsx | 3 ++ .../views/nodes/formattedText/FormattedTextBox.tsx | 2 -- 3 files changed, 24 insertions(+), 19 deletions(-) (limited to 'src/client/views') diff --git a/src/client/views/nodes/ComparisonBox.tsx b/src/client/views/nodes/ComparisonBox.tsx index 116dc48a6..bdf92038f 100644 --- a/src/client/views/nodes/ComparisonBox.tsx +++ b/src/client/views/nodes/ComparisonBox.tsx @@ -206,24 +206,28 @@ export class ComparisonBox extends ViewBoxAnnotatableComponent() ); }; - return ( -
- {displayBox(`${this.fieldKey}_2`, 1, this._props.PanelWidth() - 3)} -
- {displayBox(`${this.fieldKey}_1`, 0, 0)} -
+ if (this.Document._layout_isFlashcard) { + return
{displayBox(`${this.fieldKey}_2`, 1, this._props.PanelWidth() - 3)}
; + } else { + return ( +
+ {displayBox(`${this.fieldKey}_2`, 1, this._props.PanelWidth() - 3)} +
+ {displayBox(`${this.fieldKey}_1`, 0, 0)} +
-
(this._props.PanelWidth() - 5) / this._props.PanelWidth() ? 'w-resize' : undefined, - }} - onPointerDown={e => !this._isAnyChildContentActive && this.registerSliding(e, this._props.PanelWidth() / 2)} /* if clicked, return slide-bar to center */ - > -
+
(this._props.PanelWidth() - 5) / this._props.PanelWidth() ? 'w-resize' : undefined, + }} + onPointerDown={e => !this._isAnyChildContentActive && this.registerSliding(e, this._props.PanelWidth() / 2)} /* if clicked, return slide-bar to center */ + > +
+
-
- ); + ); + } } } diff --git a/src/client/views/nodes/DocumentView.tsx b/src/client/views/nodes/DocumentView.tsx index ed5d31664..7e86125e5 100644 --- a/src/client/views/nodes/DocumentView.tsx +++ b/src/client/views/nodes/DocumentView.tsx @@ -569,6 +569,9 @@ export class DocumentViewInternal extends DocComponent LightboxView.Instance.SetLightboxDoc(this.Document), icon: 'external-link-alt' }); } appearanceItems.push({ description: 'Pin', event: () => this._props.pinToPres(this.Document, {}), icon: 'eye' }); + + // if(this.layoutDoc.) + appearanceItems.push({ description: 'Pin', event: () => this._props.pinToPres(this.Document, {}), icon: 'eye' }); !Doc.noviceMode && templateDoc && appearanceItems.push({ description: 'Open Template ', event: () => this._props.addDocTab(templateDoc, OpenWhere.addRight), icon: 'eye' }); !appearance && appearanceItems.length && cm.addItem({ description: 'Appearance...', subitems: appearanceItems, icon: 'compass' }); diff --git a/src/client/views/nodes/formattedText/FormattedTextBox.tsx b/src/client/views/nodes/formattedText/FormattedTextBox.tsx index 0193cdbfc..61d6094b9 100644 --- a/src/client/views/nodes/formattedText/FormattedTextBox.tsx +++ b/src/client/views/nodes/formattedText/FormattedTextBox.tsx @@ -931,8 +931,6 @@ export class FormattedTextBox extends ViewBoxAnnotatableComponent (this.layoutDoc[`_${this._props.fieldKey}_usePath`] = usepath === 'alternate' || usepath === undefined ? 'alternate:hover' : undefined), icon: !this.Document._layout_enableAltContentUI ? 'eye-slash' : 'eye', }); - // if (usepath === undefined || usepath === 'alternate') usepath = 'alternate: hover' - // if (usepath === 'alternate:hover') usepath = undefined; } !Doc.noviceMode && appearanceItems.push({ description: 'Show Highlights...', noexpand: true, subitems: highlighting, icon: 'hand-point-right' }); -- cgit v1.2.3-70-g09d2