From 4237c423cafea47ab11a593d5f150692a6b23d93 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Wed, 18 Nov 2020 19:09:29 +0100 Subject: clicking the nav bar jumps to that point --- .../frontend/app/views/viewer/nav/viewer.icons.js | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'animism-align/frontend/app/views/viewer/nav/viewer.icons.js') diff --git a/animism-align/frontend/app/views/viewer/nav/viewer.icons.js b/animism-align/frontend/app/views/viewer/nav/viewer.icons.js index 6fa8f4e..c8eb68e 100644 --- a/animism-align/frontend/app/views/viewer/nav/viewer.icons.js +++ b/animism-align/frontend/app/views/viewer/nav/viewer.icons.js @@ -38,14 +38,21 @@ export const Arrow = React.memo(({ type }) => ( // volume toggle -export const VolumeControl = React.memo(({ volume }) => ( -
actions.audio.setVolume(volume ? 0.0 : 1.0)}> +export const VolumeControlIcon = ({ volume }) => ( +
{ + e && e.stopPropagation() + actions.audio.setVolume(volume ? 0.0 : 1.0) + }} + >
-)) +) +export const VolumeControl = React.memo(VolumeControlIcon) // play / pause button @@ -64,7 +71,10 @@ export const PlayButton = ({ playing }) => { return (
playing ? actions.audio.pause() : actions.viewer.playFromClick()} + onClick={e => { + e && e.stopPropagation() + playing ? actions.audio.pause() : actions.viewer.playFromClick() + }} > {playing ? PauseIcon : PlayIcon}
-- cgit v1.2.3-70-g09d2