fixed reset enhancements button
This commit is contained in:
parent
d122599ef2
commit
620cca8b4f
1 changed files with 6 additions and 5 deletions
|
@ -199,7 +199,7 @@ function ComicBook(id, srcs, opts) {
|
||||||
.attr("id", "cb-color")
|
.attr("id", "cb-color")
|
||||||
.addClass("cb-control cb-floating")
|
.addClass("cb-control cb-floating")
|
||||||
.append("<label>brightness</label>")
|
.append("<label>brightness</label>")
|
||||||
.append($("<div id='brightness'></div>").slider({
|
.append($("<div id='cb-brightness'></div>").slider({
|
||||||
value: 0,
|
value: 0,
|
||||||
step: 10,
|
step: 10,
|
||||||
min: -1000,
|
min: -1000,
|
||||||
|
@ -229,7 +229,7 @@ function ComicBook(id, srcs, opts) {
|
||||||
}
|
}
|
||||||
}))
|
}))
|
||||||
.append("<input type='checkbox' id='cb-desaturate' /> <label for='cb-desaturate'>Desaturate</label>")
|
.append("<input type='checkbox' id='cb-desaturate' /> <label for='cb-desaturate'>Desaturate</label>")
|
||||||
.append("<button id='reset' style='display:block'>reset</button>")
|
.append("<button id='cb-reset' style='display:block'>reset</button>")
|
||||||
.css({
|
.css({
|
||||||
position: "absolute",
|
position: "absolute",
|
||||||
top: "40%",
|
top: "40%",
|
||||||
|
@ -275,13 +275,14 @@ function ComicBook(id, srcs, opts) {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#reset").click(function() {
|
$("#cb-reset").click(function() {
|
||||||
// TODO: improve performance here.
|
// TODO: improve performance here.
|
||||||
$("#cb-brightness").slider("value", 0)
|
$("#cb-brightness").slider("value", 0);
|
||||||
|
$("#cb-contrast").slider("value", 0);
|
||||||
$("#cb-saturation").slider("value", 0);
|
$("#cb-saturation").slider("value", 0);
|
||||||
$("#cb-sharpen").slider("value", 0);
|
$("#cb-sharpen").slider("value", 0);
|
||||||
var desaturate = $("#cb-desaturate");
|
var desaturate = $("#cb-desaturate");
|
||||||
desaturate.attr("checked", !desaturate.attr("checked"));
|
desaturate.attr("checked", false);
|
||||||
ComicBook.prototype.enhance.reset();
|
ComicBook.prototype.enhance.reset();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue