schovi / react-iscroll

React component for wrapping iScroll http://iscrolljs.com/
MIT License
236 stars 60 forks source link

scrollTo with no easing #52

Closed edencorbin closed 7 years ago

edencorbin commented 7 years ago

This is more of a question than an issue, as I'm sure this is possible, I would like to use scroll to with a straight line even scroll to the position, no easing. The closest I have gotten is

    let customEase = iScroll.utils.ease.quadratic
    customEase.style = "cubic-bezier(0, 0, 1, 1)"
    this.scrollRef[0].withIScroll((iScroll) => {
        iScroll.scrollTo(0, -max, seconds, customEase);
    })

But this still has easing. How do I get a true straight line scrollTo with even speed from A->B? What am I missing?

Thank you,

edencorbin commented 7 years ago

I seemed to have fixed this, strangely by turning transitions off, then the ease is indeed off, not sure why this is, but it seems to work correctly with transitions off, closing this one.