mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Fix curly bracket issues
This commit is contained in:
parent
101abc762b
commit
d6bcc7466b
12 changed files with 40 additions and 40 deletions
|
@ -30,8 +30,9 @@ function mapClientToFraction(range, clientX) {
|
|||
const rect = range.sliderBubbleTrack.getBoundingClientRect();
|
||||
|
||||
let fraction = (clientX - rect.left) / rect.width;
|
||||
if (globalize.getIsElementRTL(range))
|
||||
if (globalize.getIsElementRTL(range)) {
|
||||
fraction = (rect.right - clientX) / rect.width;
|
||||
}
|
||||
|
||||
// Snap to step
|
||||
const valueRange = range.max - range.min;
|
||||
|
@ -490,10 +491,11 @@ EmbySliderPrototype.setKeyboardSteps = function (stepDown, stepUp) {
|
|||
|
||||
function setRange(elem, startPercent, endPercent) {
|
||||
const style = elem.style;
|
||||
if (globalize.getIsRTL())
|
||||
if (globalize.getIsRTL()) {
|
||||
style.right = Math.max(startPercent, 0) + '%';
|
||||
else
|
||||
} else {
|
||||
style.left = Math.max(startPercent, 0) + '%';
|
||||
}
|
||||
|
||||
const widthPercent = endPercent - startPercent;
|
||||
style.width = Math.max(Math.min(widthPercent, 100), 0) + '%';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue