diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2020-11-20 18:09:48 +0100 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2020-11-20 18:09:48 +0100 |
| commit | 9bbeec0c3c2f2600c3585d9d6e4f3396e416a96b (patch) | |
| tree | 9b0231da3c6ff351dba3333d836d54c16c47ecda /animism-align/frontend/app/views/viewer/nav | |
| parent | 18c0bf9f692530c5495b6b94a26e2116ba93a96f (diff) | |
mobile footer ui
Diffstat (limited to 'animism-align/frontend/app/views/viewer/nav')
| -rw-r--r-- | animism-align/frontend/app/views/viewer/nav/nav.parent.js | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/animism-align/frontend/app/views/viewer/nav/nav.parent.js b/animism-align/frontend/app/views/viewer/nav/nav.parent.js index f1ae01e..3fc2678 100644 --- a/animism-align/frontend/app/views/viewer/nav/nav.parent.js +++ b/animism-align/frontend/app/views/viewer/nav/nav.parent.js @@ -3,6 +3,7 @@ import { connect } from 'react-redux' import actions from 'app/actions' import { ROMAN_NUMERALS } from 'app/constants' +import { isMobile } from 'app/utils' import { Arrow } from './viewer.icons' import NavPlayer from './nav.player' import { thumbnailURL, sectionProgressPercentage, sectionOffsetSeconds } from 'app/utils/annotation.utils' @@ -53,14 +54,18 @@ class NavParent extends Component { } handleNavBarClick(e) { e && e.stopPropagation() - // console.log('>> CLICK NAV') - // actions.viewer.toggleComponent('nav') - const percent = (e.pageX / this.navbarRef.current.offsetWidth) - const seconds = sectionOffsetSeconds(this.props.currentSection, percent) - console.log(e.pageX, this.navbarRef.current.offsetWidth, percent) - console.log(this.props.currentSection) - console.log(">>", seconds) - actions.viewer.seekToTimestamp(seconds) + if (isMobile) { + actions.viewer.toggleComponent('nav') + } else { + // console.log('>> CLICK NAV') + // actions.viewer.toggleComponent('nav') + const percent = (e.pageX / this.navbarRef.current.offsetWidth) + const seconds = sectionOffsetSeconds(this.props.currentSection, percent) + console.log(e.pageX, this.navbarRef.current.offsetWidth, percent) + console.log(this.props.currentSection) + console.log(">>", seconds) + actions.viewer.seekToTimestamp(seconds) + } } handleSectionLinkClick(e) { e && e.stopPropagation() |
