diff --git a/css/styles.css b/css/styles.css index 8e3b9e4..414c4a8 100644 --- a/css/styles.css +++ b/css/styles.css @@ -52,6 +52,10 @@ opacity: 0; } +#cb-toolbar #cb-status { + float: right; +} + #cb-toolbar:hover { opacity: 1; } @@ -60,8 +64,3 @@ width: 200px; height: 150px; } - -#cb-status { - top: 0; - right: 0; -} diff --git a/lib/ComicBook.js b/lib/ComicBook.js index 16b6e9c..85dce82 100755 --- a/lib/ComicBook.js +++ b/lib/ComicBook.js @@ -152,17 +152,18 @@ function ComicBook(id, srcs, opts) { canvas = document.getElementById(canvas_id); context = canvas.getContext("2d"); + // render user controls + if (controlsRendered === false) { + ComicBook.prototype.renderControls(); + controlsRendered = true; + } + // add page controls // TODO: add IE event listeners too. canvas.addEventListener("click", ComicBook.prototype.navigation, false); window.addEventListener("keydown", ComicBook.prototype.navigation, false); window.addEventListener("hashchange", checkHash, false); //setInterval(function() { checkHash(); }, 300); // TODO: enable this when there is no onhashchange event - - if (controlsRendered === false) { - ComicBook.prototype.renderControls(); - controlsRendered = true; - } } /** @@ -208,7 +209,8 @@ function ComicBook(id, srcs, opts) { .click(function(){ ComicBook.prototype.zoom(scale + 0.1); }) - ), + ) + .append("
"), /** * Image enhancements @@ -286,7 +288,7 @@ function ComicBook(id, srcs, opts) { .after(this.getControl("navigation").right) .after(this.getControl("color").hide()); - $("#desaturate").click(function(e){ + $("#desaturate").click(function(){ if ($(this).is(":checked")) { ComicBook.prototype.enhance.desaturate(); } else { @@ -294,7 +296,7 @@ function ComicBook(id, srcs, opts) { } }); - $("#reset").click(function(e){ + $("#reset").click(function() { // TODO: improve performance here. $("#cb-brightness").slider("value", 0) $("#cb-saturation").slider("value", 0); @@ -390,18 +392,13 @@ function ComicBook(id, srcs, opts) { var i = pointer; // the current page counter for this method //if (i - buffer >= 0) { i = i - buffer; } // start loading from the first requested page - buffer - // show load status panel - if ($("#cb-status").length === 0) { - $(canvas).after('