Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

All palette updates add an additional addColor listener #24

Open
cloutsocks opened this issue Nov 5, 2019 · 2 comments
Open

All palette updates add an additional addColor listener #24

cloutsocks opened this issue Nov 5, 2019 · 2 comments

Comments

@cloutsocks
Copy link

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?

@cloutsocks
Copy link
Author

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?

@jano-m
Copy link

jano-m commented Dec 16, 2020

Hi cloutsocks,
could you create an npm package with your fixes?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants