From e1bafdf5e540363081ce351ca59833b7f7eaecb7 Mon Sep 17 00:00:00 2001 From: quimmrc Date: Mon, 16 Dec 2024 09:50:29 +0100 Subject: [PATCH] display time info under mouse when ruler is activated in the player interface --- .../bw-frontend/src/components/player/player-ui.js | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/freesound/static/bw-frontend/src/components/player/player-ui.js b/freesound/static/bw-frontend/src/components/player/player-ui.js index 7829801ec..0d3c03601 100644 --- a/freesound/static/bw-frontend/src/components/player/player-ui.js +++ b/freesound/static/bw-frontend/src/components/player/player-ui.js @@ -99,14 +99,13 @@ const createProgressIndicator = (parentNode, audioElement, playerImgNode, player } const rulerIndicator = playerImgNode.parentNode.getElementsByClassName('bw-player__ruler-indicator')[0]; rulerIndicator.innerText = readout; - } else { - // Update playhead - const progressPercentage = evt.offsetX / progressIndicatorContainer.clientWidth - setProgressIndicator(progressPercentage * 100, parentNode) - - // Update selected time indicator (only in big players) - updateProgressBarIndicator(parentNode, audioElement, progressPercentage) } + // Update playhead + const progressPercentage = evt.offsetX / progressIndicatorContainer.clientWidth + setProgressIndicator(progressPercentage * 100, parentNode) + + // Update selected time indicator (only in big players) + updateProgressBarIndicator(parentNode, audioElement, progressPercentage) }), 50 )