buberdds / angular-bootstrap-colorpicker

Native AngularJS colorpicker directive. No dependency on jQuery or jQuery plugin is required.
MIT License
419 stars 226 forks source link

Add a colorpicker-is-open attribute for controlling the visibility of the popover #68

Closed mattlewis92 closed 9 years ago

mattlewis92 commented 9 years ago

Continuing on from https://github.com/buberdds/angular-bootstrap-colorpicker/issues/66 here's my implementation. I tried to include a unit test but I couldn't get your tests to run. It kept giving me the error:

TypeError: Cannot read property '$injector' of undefined
        at Object.workFn (/Users/mattlewis/Sites/angular-bootstrap-colorpicker/test/libs/angular-mocks.js:1698:15)
TypeError: Cannot read property '$modules' of undefined
        at Object.workFn (/Users/mattlewis/Sites/angular-bootstrap-colorpicker/test/libs/angular-mocks.js:1769:25)
TypeError: Cannot read property 'setKnob' of undefined
        at Object.<anonymous> (/Users/mattlewis/Sites/angular-bootstrap-colorpicker/test/unit/colorpickerSpec.js:166:13)
TypeError: Cannot read property '$injector' of undefined
        at Object.<anonymous> (/Users/mattlewis/Sites/angular-bootstrap-colorpicker/test/libs/angular-mocks.js:1641:24)"

Any ideas?

buberdds commented 9 years ago

Hi there,

auto close is working only once?

mattlewis92 commented 9 years ago

I've fixed that and also added the colorpicker-close-on-select option as I realised that the model also changes when you alter the hue as well, and for my use case I only want it to close when the saturation changes.

buberdds commented 9 years ago

hope next time I'm gonna be faster ;) thank you