How do I set a minX and maxX on a draggable layer? It can't be based on the canvas size because the thing being dragged is 4000px long. But I want it to not be draggable past 280 nor past -3720.
In the listener function, just set x to your min if layer.x > minX, and the same for maxX
http://codepen.io/seoh/pen/dzurm there is `maxDragFrame` in Framer
Just spent like an hour trying all sorts of things and seem stuck. I think the problem is that my bounds are huge and off "canvas" (if there is one). So when I drag near the bounds, I get this jerky movement as though it's trying to stick to it but not happy about it.
When I set an if statement the same thing happens.
I also have a momentum animation on DragEnd which needs to respect these bounds.
I got it working with an animate to get rid of the shakies. http://www.codeshare.io/G9npE