js bug fix compiled again
This commit is contained in:
parent
a6d6c9d268
commit
935b2ceeab
File diff suppressed because one or more lines are too long
|
@ -320,10 +320,13 @@
|
|||
// Calculate the offset for the transform
|
||||
const offset = currentSlide * -50 / visibleSlides;
|
||||
const offsetmobile = currentSlide * -10 / visibleSlides;
|
||||
let timeline = document.querySelector('.__timeline-content');
|
||||
if (timeline) {
|
||||
if (window.innerWidth <= 600){
|
||||
document.querySelector('.__timeline-content').style.transform = `translateX(${offsetmobile}%)`;
|
||||
timeline.style.transform = `translateX(${offsetmobile}%)`;
|
||||
} else {
|
||||
document.querySelector('.__timeline-content').style.transform = `translateX(${offset}%)`;
|
||||
timeline.style.transform = `translateX(${offset}%)`;
|
||||
}
|
||||
}
|
||||
|
||||
// Enable/disable arrows based on the current slide
|
||||
|
|
Loading…
Reference in New Issue