Skip to content

Commit

Permalink
Use calc to get the middle of the marker
Browse files Browse the repository at this point in the history
  • Loading branch information
enter-a-random-username authored and thornbill committed Jun 10, 2024
1 parent afa670e commit 60543a4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/elements/emby-slider/emby-slider.js
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ function setMarker(range, valueMarker, marker, valueProgress) {
return;
}

marker.style.left = valueMarker + '%';
marker.style.left = 'calc(' + valueMarker + '% - ' + markerRect.width / 2 + 'px)';

if (valueProgress >= valueMarker) {
marker.classList.remove('unwatched');
Expand Down

0 comments on commit 60543a4

Please sign in to comment.