File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -67,6 +67,10 @@ export class ColorWheel extends Component {
67
67
if ( radius < 0.1 ) {
68
68
this . forceUpdate ( '#ffffff' )
69
69
}
70
+
71
+ if ( this . props . onColorChangeComplete ) {
72
+ this . props . onColorChangeComplete ( this . state . hsv ) ;
73
+ }
70
74
} ,
71
75
} )
72
76
}
@@ -147,9 +151,10 @@ export class ColorWheel extends Component {
147
151
148
152
updateColor = ( { nativeEvent} ) => {
149
153
const { deg, radius} = this . calcPolar ( nativeEvent )
150
- const currentColor = colorsys . hsv2Hex ( { h : deg , s : 100 * radius , v : 100 } )
151
- this . setState ( { currentColor} )
152
- this . props . onColorChange ( { h : deg , s : 100 * radius , v : 100 } )
154
+ const hsv = { h : deg , s : 100 * radius , v : 100 } ;
155
+ const currentColor = colorsys . hsv2Hex ( hsv )
156
+ this . setState ( { hsv, currentColor} )
157
+ this . props . onColorChange ( hsv ) ;
153
158
}
154
159
155
160
forceUpdate = color => {
You can’t perform that action at this time.
0 commit comments