diff --git a/lib/ComicBook.js b/lib/ComicBook.js
index 7e8ca25..dc319c1 100755
--- a/lib/ComicBook.js
+++ b/lib/ComicBook.js
@@ -178,6 +178,8 @@ function ComicBook(id, srcs, opts) {
ComicBook.prototype.enhance.brightness({ contrast: ui.value });
}
}))
+ .append("")
+ .append("")
.css({
position: "absolute",
top: "40%",
@@ -208,10 +210,19 @@ function ComicBook(id, srcs, opts) {
* TODO: center, make sure they never leave the visible portion of the screen
*/
ComicBook.prototype.renderControls = function() {
+
$(canvas)
.after(this.getControl("navigation").left)
.after(this.getControl("navigation").right)
.after(this.getControl("image").hide());
+
+ $("#desaturate").click(function(e){
+ if (this.checked) {
+ ComicBook.prototype.enhance.desaturate();
+ } else {
+ ComicBook.prototype.enhance.resaturate();
+ }
+ })
};
ComicBook.prototype.getControl = function(control) {
@@ -533,6 +544,14 @@ function ComicBook(id, srcs, opts) {
init();
},
+ /**
+ * Undo desaturate
+ */
+ resaturate: function() {
+ delete options.enhance.desaturate;
+ ComicBook.prototype.drawPage();
+ },
+
/**
* Sharpen
*