From 526d556304d9f9a3cafded5a0c5d7b17e525d310 Mon Sep 17 00:00:00 2001 From: bobzel Date: Mon, 20 May 2024 15:45:58 -0400 Subject: reverted alt text text switch icon to include hover --- src/client/views/nodes/formattedText/FormattedTextBox.tsx | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) (limited to 'src') diff --git a/src/client/views/nodes/formattedText/FormattedTextBox.tsx b/src/client/views/nodes/formattedText/FormattedTextBox.tsx index 542a68c3b..cf171c14b 100644 --- a/src/client/views/nodes/formattedText/FormattedTextBox.tsx +++ b/src/client/views/nodes/formattedText/FormattedTextBox.tsx @@ -1961,17 +1961,11 @@ export class FormattedTextBox extends ViewBoxAnnotatableComponent ); } - cycleAlternateText = () => { - if (this.layoutDoc._layout_enableAltContentUI) { - const usePath = this.layoutDoc[`_${this._props.fieldKey}_usePath`]; - this.layoutDoc[`_${this._props.fieldKey}_usePath`] = usePath === undefined ? 'alternate' : undefined; - } + cycleAlternateText = (skipHover?: boolean) => { + this.layoutDoc._layout_enableAltContentUI = true; + const usePath = this.layoutDoc[`_${this._props.fieldKey}_usePath`]; + this.layoutDoc[`_${this._props.fieldKey}_usePath`] = usePath === undefined ? 'alternate' : usePath === 'alternate' && !skipHover ? 'alternate:hover' : undefined; }; - // cycleAlternateText = (skipHover?: boolean) => { - // this.layoutDoc._layout_enableAltContentUI = true; - // const usePath = this.layoutDoc[`_${this._props.fieldKey}_usePath`]; - // this.layoutDoc[`_${this._props.fieldKey}_usePath`] = usePath === undefined ? 'alternate' : usePath === 'alternate' && !skipHover ? 'alternate:hover' : undefined; - // }; @computed get overlayAlternateIcon() { const usePath = this.layoutDoc[`_${this._props.fieldKey}_usePath`]; return ( -- cgit v1.2.3-70-g09d2