Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add debounce option for emitting input event or disable animation #7

Open
bartoszmagier opened this issue Apr 16, 2018 · 3 comments
Open

Comments

@bartoszmagier
Copy link

When the user clicks on the slider every step between the values is animated and the value is emitted, which can sometimes slow down the browser (e.g. if there is validation and slider has a large min/max range, then there are a lot of steps and animation can be long).

Can you add an option for disabling the animation or debounce emitting the input event (so the animation of the knob will be played, but the value will update at the end, just once)

@Saymon-biz
Copy link
Contributor

Good idea, it will be useful in some cases

@Jeremy-F
Copy link

Jeremy-F commented Dec 17, 2018

Hello @bartoszmagier ,

I had the same problem.
The only solution I found without having to fork the project was to perform the installation by hand, and modify the event functions.

let vueCircleSlider = require("vue-circle-slider").CircleSlider;
vueCircleSlider.methods.handleClick = () => {};
vueCircleSlider.methods.handleMouseDown = () => {};
vueCircleSlider.methods.handleMouseUp = () => {};
vueCircleSlider.methods.handleTouchMove = () => {};
vueCircleSlider.methods.handleWindowMouseMove = () => {};

....

componenents: {
    'VueCircleSlider': vueCircleSlider
}

I'm not saying it's a good solution, as a better solution would be a pull request with a "clickable" or "fixed" property and conditions.

@admicaa
Copy link

admicaa commented Apr 2, 2019

Mmmmmm, I think that I handled this problem and made a pull request, but he can't see it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants