From 6d2df4175ed9ef611a679eb6379755f9c0e7835a Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Mon, 9 Nov 2020 18:08:29 +0100 Subject: clicking the first work seeks to the beginning of the section --- .../frontend/app/views/viewer/checklist/checklist.content.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'animism-align/frontend/app/views/viewer/checklist/checklist.content.js') diff --git a/animism-align/frontend/app/views/viewer/checklist/checklist.content.js b/animism-align/frontend/app/views/viewer/checklist/checklist.content.js index d0f115c..8beb9af 100644 --- a/animism-align/frontend/app/views/viewer/checklist/checklist.content.js +++ b/animism-align/frontend/app/views/viewer/checklist/checklist.content.js @@ -8,8 +8,13 @@ import { thumbnailURL } from 'app/utils/annotation.utils' import { PlayIcon } from '../nav/viewer.icons' class ChecklistContent extends Component { - handleMediaSelection(section, mediaItem) { - actions.viewer.seekToMediaItem(section, mediaItem) + handleMediaSelection(section, mediaItem, i) { + if (i === 0 && section.index !== 0) { + actions.viewer.hideNavComponent('checklist') + actions.viewer.seekToSection(section) + } else { + actions.viewer.seekToMediaItem(section, mediaItem) + } } render() { @@ -27,7 +32,7 @@ class ChecklistContent extends Component {
this.handleMediaSelection(section, mediaItem)} + onClick={() => this.handleMediaSelection(section, mediaItem, i)} >
{pad(section.mediaIndex + i + 1, 2)} -- cgit v1.2.3-70-g09d2