bgrins / spectrum

The No Hassle JavaScript Colorpicker
https://bgrins.github.io/spectrum/
MIT License
2.32k stars 588 forks source link

Cancel does not do enough reversion #509

Open ron4mac opened 6 years ago

ron4mac commented 6 years ago

I am using the move() callback to dynamically change the colors of elements on the page for a better sense of the color change effect. When the color picker is canceled, however, there is no convenient way to receive that notice and revert the page element. For my use, I have resolved the issue by adding move() after revert() in the cancelButton function. This, I suppose, could be made optional with an option such as moveOnCancel.