diff options
-rw-r--r-- | src/client/views/nodes/formattedText/FormattedTextBox.tsx | 28 |
1 files changed, 23 insertions, 5 deletions
diff --git a/src/client/views/nodes/formattedText/FormattedTextBox.tsx b/src/client/views/nodes/formattedText/FormattedTextBox.tsx index f2c4c6c8f..0193cdbfc 100644 --- a/src/client/views/nodes/formattedText/FormattedTextBox.tsx +++ b/src/client/views/nodes/formattedText/FormattedTextBox.tsx @@ -924,6 +924,17 @@ export class FormattedTextBox extends ViewBoxAnnotatableComponent<FieldViewProps event: () => (this.layoutDoc._layout_enableAltContentUI = !this.layoutDoc._layout_enableAltContentUI), icon: !this.Document._layout_enableAltContentUI ? 'eye-slash' : 'eye', }); + if (this.Document._layout_enableAltContentUI) { + const usepath = this.layoutDoc[`_${this._props.fieldKey}_usePath`]; + appearanceItems.push({ + description: (this.layoutDoc[`_${this._props.fieldKey}_usePath`] === 'alternate:hover' ? 'no hover' : 'hover') + ' to show alt content', + event: () => (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' }); !Doc.noviceMode && appearanceItems.push({ @@ -1939,7 +1950,11 @@ export class FormattedTextBox extends ViewBoxAnnotatableComponent<FieldViewProps cycleAlternateText = () => { if (this.layoutDoc._layout_enableAltContentUI) { const usePath = this.layoutDoc[`_${this._props.fieldKey}_usePath`]; - this.layoutDoc[`_${this._props.fieldKey}_usePath`] = usePath === undefined ? 'alternate' : usePath === 'alternate' ? 'alternate:hover' : undefined; + this.layoutDoc[`_${this._props.fieldKey}_usePath`] = usePath === undefined ? 'alternate' : undefined; + //: usePath === 'alternate' ? 'alternate:hover' : undefined; + //usePath === undefined ? 'alternate' : + //undefined; + //: usePath === 'alternate' ? 'alternate:hover' : undefined; } }; @computed get overlayAlternateIcon() { @@ -1948,17 +1963,20 @@ export class FormattedTextBox extends ViewBoxAnnotatableComponent<FieldViewProps <Tooltip title={ <div className="dash-tooltip"> + flip + {/* + <div className="dash-tooltip"> toggle (%/) between <span style={{ color: usePath === undefined ? 'black' : undefined }}> - <em> primary, </em> - </span> + <em> primary </em> + </span> and <span style={{ color: usePath === 'alternate' ? 'black' : undefined }}> - <em>alternate, </em> + <em>alternate </em> </span> and show <span style={{ color: usePath === 'alternate:hover' ? 'black' : undefined }}> <em> alternate on hover</em> - </span> + </span> */} </div> }> <div |