CamanJS
CamanJS copied to clipboard
problem with jquery slider
i want to manipulate brigthness of an image with jquery slider, but when jquery slider is triggerd the image transforms to a solid black, white, gray, dark gray, light gray and etc, depends on slider range.
`
var $this;
Caman("#canvas", "/Images/pic.png", function () {
$this = this;
});
$("#slider-range").slider({
min: -100,
max: 100,
value: 0,
slide: function (event, ui) {
$this.brightness(ui.value).render();
}
});
`
I have this problem also ... Please help us ...
Because of how the slider works, you're calling render before the previous render finishes. Make sure the render calls don't overlap.— Ryan LeFevre (@meltingice) LayerVault Software Engineer
On Tue, Apr 29, 2014 at 2:50 AM, Ahmad Khojasteh [email protected] wrote:
I have this problem also ...
Please help us ...
Reply to this email directly or view it on GitHub: https://github.com/meltingice/CamanJS/issues/143#issuecomment-41646204
What do you mean by that ? You mean after slider finished the change event , then I call caman function? Can you Explain by code ? Thanks in advance.
Check out the code from the CamanJS site. It keeps track of when the Caman instance is rendering and doesn't allow render calls to overlap.