You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In a project from me, I add the colorpicker every time if i open a container and also once on page first loading. Before I add the picker, i empty the picker-div. Now is the problem, if the container is opened to fast while first initalisation, i have two pickers in the div.
I tried to reproduce this in jsfiddle, but it don't worked.
So here the link to my project: Demo
While initalisation, you have to click on the pen at the left side. Then you see the 2 colorpicker.
So my suggestion is to add a option, if the container should be emptied before appending the picker.
My Code:
$('#colorPicker').empty();
// Create a new color picker instance
// https://iro.js.org/guide.html#Getting-Started
var colorPicker = new iro.ColorPicker("#colorPicker", {
// color picker options
// Option guide: https://iro.js.org/guide.html#Color-Picker-Options
width: 180,
height: 180,
color: colorobj.fill,
anticlockwise: true,
borderWidth: 1,
borderColor: "#fff",
// Dynamic CSS guide: https://iro.js.org/guide.html#Dynamic-CSS
css: {
':root': {
'--color-wheel': '$color'
}
}
});
Thanks
The text was updated successfully, but these errors were encountered:
First: Thanks for this powerful tool!
In a project from me, I add the colorpicker every time if i open a container and also once on page first loading. Before I add the picker, i empty the picker-div. Now is the problem, if the container is opened to fast while first initalisation, i have two pickers in the div.
I tried to reproduce this in jsfiddle, but it don't worked.
So here the link to my project: Demo
While initalisation, you have to click on the pen at the left side. Then you see the 2 colorpicker.
So my suggestion is to add a option, if the container should be emptied before appending the picker.
My Code:
Thanks
The text was updated successfully, but these errors were encountered: