fixed manga mode
This commit is contained in:
parent
a1e8d77182
commit
e83dd1e875
4 changed files with 23 additions and 9 deletions
|
@ -6,7 +6,6 @@
|
|||
Fo sho:
|
||||
- create onclose callback, show close button only if set
|
||||
- fix progress bar css
|
||||
- fix manga mode
|
||||
- trigger preload if requesting valid but not loaded images (can happen if network was interupted)
|
||||
- loading and generally hackiness of pointer is buggy, fix.
|
||||
- check for html5 feature support where used: diveintohtml5.org/everything.html or www.modernizr.com
|
||||
|
@ -23,6 +22,7 @@
|
|||
- use custom event emitters instead of hacky code
|
||||
- properly bind 'this' so we don't have to keep using 'self'
|
||||
- allow toolbar to be hidden on mobile (maybe show a small translucent button that opens the toolbar when clicked)
|
||||
- enhancement progress bar
|
||||
*/
|
||||
|
||||
var ComicBook = (function ($) {
|
||||
|
@ -567,13 +567,23 @@ var ComicBook = (function ($) {
|
|||
// disable prev/next buttons if not needed
|
||||
$('.navigate').show();
|
||||
if (pointer === 0) {
|
||||
$('.navigate-left').hide();
|
||||
$('.navigate-right').show();
|
||||
if (options.manga) {
|
||||
$('.navigate-left').show();
|
||||
$('.navigate-right').hide();
|
||||
} else {
|
||||
$('.navigate-left').hide();
|
||||
$('.navigate-right').show();
|
||||
}
|
||||
}
|
||||
|
||||
if (pointer === srcs.length-1 || (typeof page2 === 'object' && pointer === srcs.length-2)) {
|
||||
$('.navigate-left').show();
|
||||
$('.navigate-right').hide();
|
||||
if (options.manga) {
|
||||
$('.navigate-left').hide();
|
||||
$('.navigate-right').show();
|
||||
} else {
|
||||
$('.navigate-left').show();
|
||||
$('.navigate-right').hide();
|
||||
}
|
||||
}
|
||||
|
||||
if (pointer !== getHash()){
|
||||
|
@ -783,6 +793,10 @@ var ComicBook = (function ($) {
|
|||
|
||||
switch (e.type) {
|
||||
|
||||
case 'click':
|
||||
side = e.currentTarget.getAttribute('data-navigate-side');
|
||||
break;
|
||||
|
||||
case 'keydown':
|
||||
|
||||
// navigation
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue