Model updates while I'm dragging the color-picker
So basically, when using the color-picker, I do not want my model updating when I drag on the color-picker. I only want my model updated when I'm done dragging and let go.
Any ideas on how to do this?
Hi, probably an outdated answer, but all you have to do is to find "mousemove" function and remove
if(ngModel) {
$scope.$apply(ngModel.$setViewValue(newColor));
}
then at the beginning of "mouseup" function add this:
if(ngModel) {
$scope.$apply(ngModel.$setViewValue(pickerColor[thisFormat]()));
}
It's a nice performance boost. I wonder if people need to update the model on every mousedown event.
$scope.$on("colorpicker-selected") works perfect for me. But the only problem is, that entering a color in the colorpicker-input field doesn't trigger that event... any chance this will be implemented?
best regards p.s.: thx for the great and simple colorpicker!
I have been using '$scope.$on("colorpicker-selected")' and it works well for only getting called when a color is selected.
Small issue (unless it's wanted functionality) encountered, though...
So when I drag around the cross-hairs the color returned in that callback works perfectly. The problem I have been having is when I simply click somewhere in the color-picker - the color returned in the callback does not get updated to my new click location. I'd be happy to elaborate on that if I'm making no sense.