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

Support watching & setting state programmatically #81

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

charleslaw
Copy link

No description provided.

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
This proposed change allows code using pick-a-color to make a color change directly on the color input element and then trigger a change event to force the preview update e.g.

```
input.val('#808080');
input.change();
```
@charleslaw
Copy link
Author

I only have the advanced tab enabled, so only tested with that. Feel free to polish this up more.

@charleslaw
Copy link
Author

Rebased on @tfennelly code since I used part of his changes.

Also, this does not set the correct labels for the HSL bars - though that doesn't matter for my use case.

@charleslaw
Copy link
Author

I discovered this solution only worked if 1 element was on the page b/c I was updated globals. I changed it to save attrs on the spectrums that are accessible everywhere.

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

Successfully merging this pull request may close these issues.

None yet

2 participants