Open sticilface opened 8 years ago
investigating further. 1.0.6 - works fine 1.0.7 broken
hope that helps
Hi @sticilface,
I was testing your snipped but I don't see the problem. What do mean by '... but it doesn't fire to send it off...'. Do you mean $.post("data.esp", inputName ...
inside buildCallback
?
I was testing all kinds of situations but I don't see a difference using 1.0.6 and 1.0.7.
Please give me more information about what's going wrong then I might be able to help you...
Cheers
sorry not particularly accurate language.
the callback does not get triggered for whatever reason. even if i place a console.log right at the top, it doesn't log anything.
apart from that i can't really help you any more. you've got all the code, and the commit that breaks it.
reverting causes it to work straight away. There is no messages in the web inspector.
I can try and use a different browser. i use safari, but didn't check if it occurs with chrome or firefox.
Is there anything else i might be able to provide to help?
Hi @sticilface ,
Now I see the problem...
The only thing that changed since the last version is, that you now can make multiple instances with different callbacks etc. So, every time you call $('.something').colorPicker();
you make a new instance with new options.
In your case, you call .colorPicker()
twice, but the second time without options and therefore you don't have any callback any more:
The first time you call:
$('.color').colorPicker({
preventFocus: true,
renderCallback: function($elm, toggled) {
...
});
and the second time you go like:
$( '#effectoptions > .input_textbox_rgb')
.find("#input_" + key)
.val("rgb(" + value[0] + "," + value[1] + "," + value[2] + ")")
.colorPicker();
but without options (and therefore without a callback function). So, either skip the second call (if that works for you) or make a general option setup like:
var colorPickerOptions = {
preventFocus: true,
renderCallback: function($elm, toggled) {
...
}
and then call colorPicker with those options like:
$('.color').colorPicker(colorPickerOptions);
// and
$( '#effectoptions > .input_textbox_rgb')
.find("#input_" + key)
.val("rgb(" + value[0] + "," + value[1] + "," + value[2] + ")")
.colorPicker(colorPickerOptions);
This will do it ;o) Let me know if it worked
Ah ok. thanks for taking a look at it. I will modify and let you know how i get on
I've had this working for some time now, in a project. (using version from before xmas)
I just updated it, and my event handler is no longer working.
Here is a link to the html file with the full js.. https://github.com/sticilface/Melvanimate/blob/master/examples/Melvanimate-example/data/index.htm
the code for the render is here
the colour picker seems to work fine. appears... selects colours... but it doesn't fire to send it off... and I've no idea why