Closed ccveer closed 5 years ago
I can certainly see the use for this, so I've had a stab at an implementation.
I think the best way to be able to control the dragger programatically is by exposing some kind of API via a ref
. Basically what this React component does with Flickity (note the <Flickity flickityRef={c => this.flkty = c}>
): https://github.com/theolampert/react-flickity-component#readme
Take a look at Example1 in this branch I've created which now features +/- positioning buttons. Curious what you think and whether this the right approach?
https://github.com/nickmcmillan/react-physics-dragger/tree/feature/set-position
I think it looks good, but could we add an edge checker? So that if you try to page past the edge of the slider, it slides back with friction?
This looks great! Is there any chance this will be released soon?
Sorry it's taken a while to get here @ccveer ! I've completed some work and will create a PR now.
Ok merged. I've updated the docs too. Have deployed it to npm @1.2.0
We would like to add buttons to page through the slider. Could this functionality be enabled? We are willing to do the work if you would be willing to accept the PR. Thanks!