How to change or destroy color picker
marekburiak opened this issue · comments
More of a question than an issue. Or maybe a feature request.
Is there a way to change options after color picker is created? Like for example to change layout. If not, is there a clean way to destroy an existing color picker (without causing memory leaks)?
You can use the setOptions
methods to pass new options to a color picker after it's been created, e.g:
const picker = new iro.ColorPicker("#picker", {
width: 300
});
// sometime later
picker.setOptions({
width: 400
});
Hope that helps!