Closed shanizar closed 7 years ago
I changed Math.round(variable 100) to Math.round(variable 10000)/100 in watchNgModel function at it seems to fix the problem.
@shanizar I cannot replicate this issue on the latest version. There was an issue in v2.6.0 which you can see here - https://github.com/ruhley/angular-color-picker/issues/124. If you are using the latest version can you tell me more about your environment (os, browser, etc) and create a plunker that replicates the issue.
@ruhley I'm sorry, code was still using v2.6.1. You are quite right, the issue is fixed in the latest version. Thank you for the reply.
If I choose "hex" as format the color picker will change my stored value just by opening the picker. I'm pretty sure this is because of the rounding of values done in the directive.
Example: set model value to "#123456". Open color-picker and it will change to "#123457"