leo6104 / ngx-slick-carousel

Angular 17+ wrapper for slick plugin
106 stars 43 forks source link

swipeToSlide is not working on RTL #109

Open marslan2037 opened 1 year ago

marslan2037 commented 1 year ago

Hi, I am using Angular 12, and Slick 0.5.1. The problem i am facing is swipeToSlide is working fine in LTR, but in RTL it is not working at all. I am updating rtl value dynamically.

`slideConfig = {
    "slidesToShow": 10,
    // "slidesToScroll": 1,
    swipeToSlide: true,
    touchThreshold: 309,
    arrows: true,
    infinite: true,
    dots: false,
    variableWidth: true,
    rtl: this.isRTL
};`

`updateRTL() {
    const lang = localStorage.getItem('lang');
    if(lang == 'yi' || lang == 'he') {
        this.isRTL = true;
    } else {
        this.isRTL = false;
    }
    this.slideConfig.rtl = this.isRTL;
}`

Anyone please help me to fix the issue.

marslan2037 commented 1 year ago

I just found that if i remove variableWidth: true, it start working fine, but i need that property