a-color-picker
a-color-picker copied to clipboard
All palette updates add an additional addColor listener
Fantastic plug-in!
I have only two small issues. Whenever I use picker.palette = <blah>, it seems setPalette creates listeners each time anew. So every time I change the stock palettes in the picker, more and more duplicated listeners get added.
Similarly, is there a way to disable the default actions for adding and removing?
Some more info: I think it was assumed resetting innerHTML of this.paletteRow to '' would clear the event listener, but it doesn't. On my end, I've patched setPalette to not accept any argument, and to initialize paletteRow if it doesn't exist (as well as add the event listener)
I could issue a PR if it helps?
Hi cloutsocks, could you create an npm package with your fixes?