Skip to content

Commit

Permalink
Bump
Browse files Browse the repository at this point in the history
  • Loading branch information
artf committed Feb 2, 2021
1 parent 1eb212e commit cb3a715
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 5 deletions.
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,9 @@ In the example below we use [spectrum](https://github.com/bgrins/spectrum) color
gp.setColorPicker(handler => {
const el = handler.getEl().querySelector('#colorpicker');
const $el = $(el);
$(el).spectrum({
$el.spectrum({
color: handler.getColor(),
showAlpha: true,
change(color) {
Expand All @@ -95,6 +96,11 @@ In the example below we use [spectrum](https://github.com/bgrins/spectrum) color
handler.setColor(color.toRgbString(), 0);
}
});
// return a function in order to destroy the custom color picker
return () => {
$el.spectrum('destroy');
}
});
</script>
```
Expand Down
Loading

0 comments on commit cb3a715

Please sign in to comment.