From 8690c78083105cb9ac3ddd4d64697e9d5a1933d7 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Sat, 21 Nov 2020 17:32:41 +0100 Subject: positioning tooltips neatly --- animism-align/frontend/app/views/viewer/nav/eflux.chrome.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'animism-align') diff --git a/animism-align/frontend/app/views/viewer/nav/eflux.chrome.js b/animism-align/frontend/app/views/viewer/nav/eflux.chrome.js index b9fe340..5775b11 100644 --- a/animism-align/frontend/app/views/viewer/nav/eflux.chrome.js +++ b/animism-align/frontend/app/views/viewer/nav/eflux.chrome.js @@ -47,6 +47,12 @@ class EfluxChrome extends Component { }) } } + else if (prevProps.atEndOfSection !== this.props.atEndOfSection && this.props.atEndOfSection) { + // reached end of section + if (this.props.currentSection.index === 0) { + this.setState({ transcript: true }) + } + } } render() { const { @@ -55,7 +61,6 @@ class EfluxChrome extends Component { growlOpen, growlMessage, atEndOfSection, currentSection } = this.props - const showingTranscriptTooltip = ((atEndOfSection && currentSection.index === 0) || this.state.transcript) let className = "eflux-header" if (navStyle) className += ' ' + navStyle if (navGradient) className += ' gradient' @@ -115,14 +120,14 @@ class EfluxChrome extends Component { {'Back to e-flux'}
{this.state.playMessage}