1
1
/**
2
2
* ColorPicker
3
3
* https://github.com/foo123/ColorPicker
4
- * @version 2.2.1
4
+ * @version 2.2.2
5
5
*
6
6
* adapted from:
7
7
* http://www.eyecon.ro/colorpicker/
@@ -798,7 +798,10 @@ function ColorPicker(el, options)
798
798
} ;
799
799
self . setColor = function ( color , opacity ) {
800
800
if ( set_color ( model , color , opacity ) )
801
+ {
801
802
update_ui ( model , fields , true ) ;
803
+ update_element ( self , colorselector , input , get_color ( model , format ) , false ) ;
804
+ }
802
805
} ;
803
806
self . getColor = function ( fmt ) {
804
807
return get_color ( model , fmt || format ) ;
@@ -807,7 +810,10 @@ function ColorPicker(el, options)
807
810
if ( arguments . length )
808
811
{
809
812
if ( set_color ( model , color , opacity ) )
813
+ {
810
814
update_ui ( model , fields , true ) ;
815
+ update_element ( self , colorselector , input , get_color ( model , format ) , false ) ;
816
+ }
811
817
}
812
818
else
813
819
{
@@ -920,7 +926,7 @@ function ColorPicker(el, options)
920
926
if ( hasClass ( el , 'colorpicker-transition-fade' ) ) addClass ( ui , 'colorpicker-transition-fade' ) ;
921
927
if ( hasClass ( el , 'colorpicker-transition-slide' ) ) addClass ( ui , 'colorpicker-transition-slide' ) ;
922
928
}
923
- ColorPicker . VERSION = '2.2.1 ' ;
929
+ ColorPicker . VERSION = '2.2.2 ' ;
924
930
ColorPicker . WIDTH = 343 ;
925
931
ColorPicker . HEIGHT = 195 ;
926
932
return ColorPicker ;
0 commit comments