ruhley / angular-color-picker

Vanilla AngularJS Color Picker Directive with no requirement on jQuery
http://ruhley.github.io/angular-color-picker/
MIT License
165 stars 78 forks source link

Add preserveInputFormat option #164

Closed stephennancekivell closed 7 years ago

stephennancekivell commented 7 years ago

Add preserveInputFormat option to control whether or not a valid input color of a different format should change to the configured format. I think this is a bit of a UX issue, people dont expect what they typed in to suddenly change.

I've added this as a configuration option defaulting to the current behaviour so the next release isnt a breaking change. However It might make sense to change the default to "on" at some point. I think most people will want preserveInputFormat to be on.

Before, now with preserveInputFormat off (the default) preserve-off

Now, with preserveInputFormat on. preserve-on

ruhley commented 7 years ago

@stephennancekivell Thanks for this, a great option to have. Can you please do the PR without any changes to the dist folder. I will bundle a release next week.

stephennancekivell commented 7 years ago

Sure thing @ruhley, I've just pushed without /dist. Thanks :)