Skip to content

Commit

Permalink
Fix issue [#46]
Browse files Browse the repository at this point in the history
  • Loading branch information
kallookoo committed Dec 2, 2021
1 parent b83cdb3 commit 9f6c7cb
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 13 deletions.
17 changes: 10 additions & 7 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,21 +32,21 @@ Add class `.color-picker` and `data-alpha-enabled="true"` in input.
### Optional
* data-alpha-reset:

For set Alpha Channel for disabled transparency after press color palette.

* data-alpha-custom-width:

By default the input width is increased so that everything can be seen, with a value of 130 plus the original size.

For change default input width ( change the number you want, "in pixels" )

To disable this feature can also specify the value like "false" or "0".

* data-alpha-color-type:

To set the type of color format; hex, rgb, hsl. Use the current or default color.

By default is rgb and if is hex change to rgba when the alpha channel is set. It also supports rgba and hsla.


Expand All @@ -64,6 +64,9 @@ For testing download or clone [wp-color-picker-alpha-plugin](https://github.com/


## Changelog
###### v3.0.1
* Issue [#46](../../issues/46)

###### v3.0.0
* Rewrite the code, now only the necessary methods are overwritten to try to give better compatibility.
* Issue [#4](../../issues/4)
Expand All @@ -79,7 +82,7 @@ For testing download or clone [wp-color-picker-alpha-plugin](https://github.com/

###### v2.1.3
* Fix issue [#13](../../pull/13), Thanks for @jtsternberg, see [#15](../../pull/15)

###### v2.1.2
* Declare some global variables when is deprecated or not
* Change method to check WordPress version, recommended by @webaware, see [comments][5]
Expand Down
4 changes: 2 additions & 2 deletions dist/wp-color-picker-alpha.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions src/wp-color-picker-alpha.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Overwrite Automattic Iris for enabled Alpha Channel in wpColorPicker
* Only run in input and is defined data alpha in true
*
* Version: 3.0.0
* Version: 3.0.1
* https://github.com/kallookoo/wp-color-picker-alpha
* Licensed under the GPLv2 license or later.
*/
Expand Down Expand Up @@ -567,7 +567,7 @@
*
* @since 3.0.0
*/
self.toggler.click( function() {
self.toggler.on( 'click', function() {
if ( self.toggler.hasClass( 'wp-picker-open' ) ) {
self.close();
} else {
Expand Down Expand Up @@ -611,7 +611,7 @@
*
* @return {void}
*/
self.button.click( function( event ) {
self.button.on( 'click', function( event ) {
if ( $( this ).hasClass( 'wp-picker-default' ) ) {
el.val( self.options.defaultColor ).change();
} else if ( $( this ).hasClass( 'wp-picker-clear' ) ) {
Expand All @@ -632,4 +632,4 @@
} );
},
} );
} ( jQuery ) );
} ( jQuery ) );

0 comments on commit 9f6c7cb

Please sign in to comment.