diff options
| -rw-r--r-- | animism-align/frontend/app/views/viewer/checklist/checklist.content.js | 11 |
1 files changed, 8 insertions, 3 deletions
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 { <div className="checklist-row" key={section.index + "_" + i} - onClick={() => this.handleMediaSelection(section, mediaItem)} + onClick={() => this.handleMediaSelection(section, mediaItem, i)} > <div className="media-id"> {pad(section.mediaIndex + i + 1, 2)} |
