darsain / sly

JavaScript library for one-directional scrolling with item based navigation support.
http://darsa.in/sly
2.87k stars 497 forks source link

How the slider width is detected? How can I increase it? #298

Closed PSzczepanski1996 closed 5 years ago

PSzczepanski1996 commented 5 years ago

My html divs are constructed like that:

<div class="scrollbar">
       <div class="handle" style="transform: translateZ(0px) translateX(594px); width: 55px;">
              <div class="mousearea"></div>
       </div>
</div>

How can I overwrite width where slider can go? So translateX can go over 594px - how 594px as max width is calculated?

Thanks.

PSzczepanski1996 commented 5 years ago

Fixed, I needed to initialize Sly after JS changes and reload it on every resize.