Adjust thumbnail positioning offsets for improved visual alignment
This commit is contained in:
parent
8103839e72
commit
371b3be5fd
@ -348,15 +348,16 @@
|
||||
}
|
||||
selectedThumbnailIndex = index;
|
||||
videoInfo[selectedThumbnailIndex].thumbnail.classList.add("focussed");
|
||||
const offset = 12;
|
||||
for (let i = 0; i < videoInfo.length; i++) {
|
||||
if (i < selectedThumbnailIndex - 1) {
|
||||
videoInfo[i].thumbnail.style.left = "-20%";
|
||||
} else if (i === selectedThumbnailIndex - 1) {
|
||||
videoInfo[i].thumbnail.style.left = "15%";
|
||||
videoInfo[i].thumbnail.style.left = offset + "%";
|
||||
} else if (i === selectedThumbnailIndex) {
|
||||
videoInfo[i].thumbnail.style.left = "50%";
|
||||
} else if (i === selectedThumbnailIndex + 1) {
|
||||
videoInfo[i].thumbnail.style.left = "85%";
|
||||
videoInfo[i].thumbnail.style.left = (100 - offset) + "%";
|
||||
} else {
|
||||
videoInfo[i].thumbnail.style.left = "120%";
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user