mirror of
https://github.com/sussy-code/smov.git
synced 2024-12-29 16:07:40 +01:00
Decrease scroll amount using buttons
This commit is contained in:
parent
2655154ce9
commit
68ccddd171
1 changed files with 1 additions and 1 deletions
|
@ -163,7 +163,7 @@ export function Discover() {
|
|||
if (movieElements.length > 0) {
|
||||
const movieWidth = movieElements[0].offsetWidth;
|
||||
const visibleMovies = Math.floor(carousel.offsetWidth / movieWidth);
|
||||
const scrollAmount = movieWidth * visibleMovies;
|
||||
const scrollAmount = movieWidth * visibleMovies * 0.69; // Silly number :3
|
||||
if (direction === "left") {
|
||||
if (carousel.scrollLeft <= 5) {
|
||||
carousel.scrollBy({
|
||||
|
|
Loading…
Reference in a new issue