mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Use % for playback slider marker postions (#5394)
* Use % for slider postions * Use calc to get the middle of the marker * Update src/elements/emby-slider/emby-slider.js Co-authored-by: Grady Hallenbeck <grhallenbeck@users.noreply.github.com> --------- Co-authored-by: Grady Hallenbeck <grhallenbeck@users.noreply.github.com>
This commit is contained in:
parent
aab373264f
commit
ff2ed9aeab
1 changed files with 1 additions and 4 deletions
|
@ -239,10 +239,7 @@ function setMarker(range, valueMarker, marker, valueProgress) {
|
|||
return;
|
||||
}
|
||||
|
||||
let markerPos = (bubbleTrackRect.width * valueMarker / 100) - markerRect.width / 2;
|
||||
markerPos = Math.min(Math.max(markerPos, - markerRect.width / 2), bubbleTrackRect.width - markerRect.width / 2);
|
||||
|
||||
marker.style.left = markerPos + 'px';
|
||||
marker.style.left = `calc(${valueMarker}% - ${markerRect.width / 2}px)`;
|
||||
|
||||
if (valueProgress >= valueMarker) {
|
||||
marker.classList.remove('unwatched');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue