current page indicator

This commit is contained in:
Bala Clark 2011-09-04 15:38:59 +02:00
parent 77578d6ca5
commit fc6ac527f1

View file

@ -4,15 +4,15 @@
TODOs: TODOs:
Fo sho: Fo sho:
- fix last page loading bug
- make control images sprites - make control images sprites
- disable the strech button if in an auto zoom mode - disable the strech button if in an auto zoom mode
- current page indicator
- jump to page?
- improve prev/next buttons, only show them when they can possibly work (not at beginning/end) - improve prev/next buttons, only show them when they can possibly work (not at beginning/end)
- check for html5 feature support where used: diveintohtml5.org/everything.html or www.modernizr.com - check for html5 feature support where used: diveintohtml5.org/everything.html or www.modernizr.com
- write bin scripts to minify & join all js - write bin scripts to minify & join all js
Nice 2 have: Nice 2 have:
- jump to page?
- enable menu items via config, allow for custom items - enable menu items via config, allow for custom items
- decouple controls from reader api - decouple controls from reader api
- split out classes into seperate files - split out classes into seperate files
@ -239,6 +239,11 @@ function ComicBook(id, srcs, opts) {
options.zoomMode = "fitWidth" options.zoomMode = "fitWidth"
ComicBook.prototype.drawPage(); ComicBook.prototype.drawPage();
}) })
)
.append(
$(document.createElement("p"))
.attr("id", "cb-comic-info")
.append("<span id='cb-current-page'></span> / " + srcs.length)
), ),
/** /**
@ -619,6 +624,9 @@ function ComicBook(id, srcs, opts) {
ComicBook.prototype.enhance[action](options); ComicBook.prototype.enhance[action](options);
}); });
var current_page = (options.displayMode === "double") ? (pointer+1) + "-" + (pointer+2) : pointer+1
$("#cb-current-page").text(current_page);
// revert page mode back to double if it was auto switched for a double page spread // revert page mode back to double if it was auto switched for a double page spread
if (is_double_page_spread) { options.displayMode = "double"; } if (is_double_page_spread) { options.displayMode = "double"; }