10 | | if ( 'custom' === active ) { |
11 | | // Activate the hue color picker control and focus it. |
12 | | control.activate( { |
13 | | completeCallback: function() { |
14 | | control.focus(); |
15 | | } |
16 | | } ); |
17 | | } else { |
18 | | // If the `custom` option isn't selected, deactivate the hue color picker and set a default. |
19 | | control.deactivate( { |
20 | | completeCallback: function() { |
21 | | control.setting.set( control.params.defaultValue ); |
22 | | } |
23 | | } ); |
24 | | } |
25 | | } ); |
| 11 | if ( 'custom' === active ) { |
| 12 | // Activate the hue color picker control and focus it. |
| 13 | control.activate( { |
| 14 | completeCallback: function() { |
| 15 | control.focus(); |
| 16 | } |
| 17 | } ); |
| 18 | } else { |
| 19 | // If the `custom` option isn't selected, deactivate the hue color picker and set a default. |
| 20 | control.deactivate( { |
| 21 | completeCallback: function() { |
| 22 | control.setting.set( control.params.defaultValue ); |
| 23 | } |
| 24 | } ); |
| 25 | } |
| 26 | } ); |
| 27 | } catch( error ) { |
| 28 | console.log( error ); |
| 29 | } |