Alberplz / angular2-color-picker

Angular 2 Color Picker Directive, no dependences required.
MIT License
185 stars 82 forks source link

toggle open close #32

Closed daniele-zurico closed 7 years ago

daniele-zurico commented 7 years ago

Is possible to toggle the color picker? I don't know how I can close the color Picker. Or have an event to manage it

Alberplz commented 7 years ago

Not yet implemented.

daniele-zurico commented 7 years ago

Well I look on your code and it's quite easy to implement it. Just change the open function to a toggle function and put an if statement on isOpen and in case call close. I already did it and it works great

Alberplz commented 7 years ago

I was writing samething too

Alberplz commented 7 years ago

When you click in the html element the color picker opens and when you click outside closes. Do you want know if the dialog is open? Also control the dialog from a variable? [(togle)]="varToggle"?

maartentibau commented 7 years ago

I would maybe also add an option to add a "close button" in the color-picker dialog, some people don't know they can close the dialog just by clicking outside of the dialog.