How to set initial color without triggering color:change callback? (solved)
wrybread opened this issue · 1 comments
wrybread commented
When I set the color when the page first loads:
colorPicker.color.set("rgb(255, 16, 65)");
It fires my color:change callback, which makes my script think someone has selected a color.
colorPicker.on('color:change', function(color) {
send_color(color.rgb);
});
This breaks my script since I only want to send the color choice if it was manually selected.
Is there a way to set the initial color color on the picker without triggering the color:change callback?
wrybread commented
Sorry, solved, changed event to input:change.