Skip to content

Commit

Permalink
add revertAlpha option. Name may change, still need docs and tests. I…
Browse files Browse the repository at this point in the history
…ssue #182
  • Loading branch information
bgrins committed Feb 25, 2014
1 parent d6156ca commit 91dfc2f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions spectrum.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
preferredFormat: false,
className: "",
showAlpha: false,
revertAlpha: true,
theme: "sp-light",
palette: [["#ffffff", "#000000", "#ff0000", "#ff8000", "#ffff00", "#008000", "#0000ff", "#4b0082", "#9400d3"]],
selectionPalette: [],
Expand Down Expand Up @@ -353,7 +354,7 @@
draggable(slider, function (dragX, dragY) {
currentHue = parseFloat(dragY / slideHeight);
isEmpty = false;
if (!opts.showAlpha) {
if (!opts.showAlpha && opts.revertAlpha) {
currentAlpha = 1;
}
move();
Expand Down Expand Up @@ -384,7 +385,7 @@
}

isEmpty = false;
if (!opts.showAlpha) {
if (!opts.showAlpha && opts.revertAlpha) {
currentAlpha = 1;
}

Expand Down

0 comments on commit 91dfc2f

Please sign in to comment.