keep color button active if its menu is open
This commit is contained in:
parent
effb313d3c
commit
8194f3e7ea
2 changed files with 9 additions and 4 deletions
|
@ -177,7 +177,7 @@ function ComicBook(id, srcs, opts) {
|
|||
)
|
||||
.append(
|
||||
$(document.createElement("button"))
|
||||
.addClass("cb-color")
|
||||
.addClass("cb-color cb-menu-button")
|
||||
.click(function(){
|
||||
ComicBook.prototype.toggleControl("color");
|
||||
})
|
||||
|
@ -212,7 +212,7 @@ function ComicBook(id, srcs, opts) {
|
|||
*/
|
||||
color: $(document.createElement("div"))
|
||||
.attr("id", "cb-color")
|
||||
.addClass("cb-control cb-floating")
|
||||
.addClass("cb-control")
|
||||
.append("<label for='cb-sharpen'>Brightness</label>")
|
||||
.append(
|
||||
$("<div id='cb-brightness' class='cb-option'></div>").slider({
|
||||
|
@ -284,7 +284,11 @@ function ComicBook(id, srcs, opts) {
|
|||
.after(this.getControl("navigation").left)
|
||||
.after(this.getControl("navigation").right)
|
||||
.after(this.getControl("color").hide());
|
||||
|
||||
|
||||
$(".cb-menu-button").click(function(e) {
|
||||
$(this).toggleClass("active");
|
||||
});
|
||||
|
||||
$("#cb-desaturate").click(function(){
|
||||
if ($(this).is(":checked")) {
|
||||
ComicBook.prototype.enhance.desaturate();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue