DRJO Posted September 27, 2021 Share Posted September 27, 2021 Been trying a few things out with draggable, trying to simulate an <input: type=range /> component with inertia. However the problem I find when using inertia with draggable it does not respect the bounds and flies offscreen when thrown, I would assume it would ease to the bounds. Apologies if I sound lazy asking maybe a simple question but I am thought I'd use gsap for my project to save time. this.dragger = Draggable.create(this.$refs['handle'], { type: 'x', edgeResistance: 1, inertia: true, throwResistance: 5000, lockAxis: true, bounds: '#progressbar', onDrag: this.onDrag, onThrowUpdate: this.onDrag, onThrowComplete: this.onThrowComplete, onDragEnd: this.onDragEnd, allowNativeTouchScrolling: false, zIndexBoost: false, overshootTolerance: 0.5 }) Link to comment Share on other sites More sharing options...
OSUblake Posted September 27, 2021 Share Posted September 27, 2021 Hi DRJO, Try using an overshoot of 0. That will prevent any overshoot. If it still flies off the screen, then your bounds aren't correct. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now