Skip to content

Commit

Permalink
Fixed filter function
Browse files Browse the repository at this point in the history
  • Loading branch information
easylogic committed Dec 2, 2018
1 parent 706019b commit 6ecdd9f
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
5 changes: 4 additions & 1 deletion addon/codemirror-colorpicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -2267,6 +2267,9 @@ function grayscale(amount) {
});
}

/*
* @param {Number} amount 0..360
*/
function hue() {
var amount = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 360;

Expand All @@ -2276,7 +2279,7 @@ function hue() {

// 0 ~ 360
var h = hsv.h;
h += Math.abs($amount);
h += Math.abs($C);
h = h % 360;
hsv.h = h;

Expand Down
2 changes: 1 addition & 1 deletion dist/codemirror-colorpicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -2330,7 +2330,7 @@ function hue() {

// 0 ~ 360
var h = hsv.h;
h += Math.abs($amount);
h += Math.abs($C);
h = h % 360;
hsv.h = h;

Expand Down
2 changes: 1 addition & 1 deletion dist/codemirror-colorpicker.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/util/filter/pixel/hue.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export default function hue (amount = 360) {

// 0 ~ 360
var h = hsv.h;
h += Math.abs($amount)
h += Math.abs($C)
h = h % 360
hsv.h = h

Expand Down

0 comments on commit 6ecdd9f

Please sign in to comment.