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:
|
Fo sho:
|
||||||
- create onclose callback, show close button only if set
|
- create onclose callback, show close button only if set
|
||||||
- fix progress bar css
|
- fix progress bar css
|
||||||
- fix manga mode
|
|
||||||
- trigger preload if requesting valid but not loaded images (can happen if network was interupted)
|
- trigger preload if requesting valid but not loaded images (can happen if network was interupted)
|
||||||
- loading and generally hackiness of pointer is buggy, fix.
|
- loading and generally hackiness of pointer is buggy, fix.
|
||||||
- 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
|
||||||
|
@ -23,6 +22,7 @@
|
||||||
- use custom event emitters instead of hacky code
|
- use custom event emitters instead of hacky code
|
||||||
- properly bind 'this' so we don't have to keep using 'self'
|
- 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)
|
- 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 ($) {
|
var ComicBook = (function ($) {
|
||||||
|
@ -567,13 +567,23 @@ var ComicBook = (function ($) {
|
||||||
// disable prev/next buttons if not needed
|
// disable prev/next buttons if not needed
|
||||||
$('.navigate').show();
|
$('.navigate').show();
|
||||||
if (pointer === 0) {
|
if (pointer === 0) {
|
||||||
$('.navigate-left').hide();
|
if (options.manga) {
|
||||||
$('.navigate-right').show();
|
$('.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)) {
|
if (pointer === srcs.length-1 || (typeof page2 === 'object' && pointer === srcs.length-2)) {
|
||||||
$('.navigate-left').show();
|
if (options.manga) {
|
||||||
$('.navigate-right').hide();
|
$('.navigate-left').hide();
|
||||||
|
$('.navigate-right').show();
|
||||||
|
} else {
|
||||||
|
$('.navigate-left').show();
|
||||||
|
$('.navigate-right').hide();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pointer !== getHash()){
|
if (pointer !== getHash()){
|
||||||
|
@ -783,6 +793,10 @@ var ComicBook = (function ($) {
|
||||||
|
|
||||||
switch (e.type) {
|
switch (e.type) {
|
||||||
|
|
||||||
|
case 'click':
|
||||||
|
side = e.currentTarget.getAttribute('data-navigate-side');
|
||||||
|
break;
|
||||||
|
|
||||||
case 'keydown':
|
case 'keydown':
|
||||||
|
|
||||||
// navigation
|
// navigation
|
||||||
|
|
|
@ -14,7 +14,7 @@ helpers = helpers || Handlebars.helpers; data = data || {};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return "\n<div data-trigger=\"click\" data-action=\"drawPrevPage\" class=\"cb-control navigate navigate-left \">\n <span class=\"icon-arrow-left\"></span>\n</div>\n";
|
return "\n<div data-trigger=\"click\" data-action=\"navigation\" data-navigate-side=\"left\" class=\"cb-control navigate navigate-left \">\n <span class=\"icon-arrow-left\"></span>\n</div>\n";
|
||||||
});
|
});
|
||||||
templates['navigateRight'] = template(function (Handlebars,depth0,helpers,partials,data) {
|
templates['navigateRight'] = template(function (Handlebars,depth0,helpers,partials,data) {
|
||||||
this.compilerInfo = [2,'>= 1.0.0-rc.3'];
|
this.compilerInfo = [2,'>= 1.0.0-rc.3'];
|
||||||
|
@ -22,7 +22,7 @@ helpers = helpers || Handlebars.helpers; data = data || {};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return "\n<div data-trigger=\"click\" data-action=\"drawNextPage\" class=\"cb-control navigate navigate-right\">\n <span class=\"icon-arrow-right\"></span>\n</div>\n";
|
return "\n<div data-trigger=\"click\" data-action=\"navigation\" data-navigate-side=\"right\" class=\"cb-control navigate navigate-right\">\n <span class=\"icon-arrow-right\"></span>\n</div>\n";
|
||||||
});
|
});
|
||||||
templates['progressbar'] = template(function (Handlebars,depth0,helpers,partials,data) {
|
templates['progressbar'] = template(function (Handlebars,depth0,helpers,partials,data) {
|
||||||
this.compilerInfo = [2,'>= 1.0.0-rc.3'];
|
this.compilerInfo = [2,'>= 1.0.0-rc.3'];
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
|
|
||||||
<div data-trigger="click" data-action="drawPrevPage" class="cb-control navigate navigate-left ">
|
<div data-trigger="click" data-action="navigation" data-navigate-side="left" class="cb-control navigate navigate-left ">
|
||||||
<span class="icon-arrow-left"></span>
|
<span class="icon-arrow-left"></span>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
|
|
||||||
<div data-trigger="click" data-action="drawNextPage" class="cb-control navigate navigate-right">
|
<div data-trigger="click" data-action="navigation" data-navigate-side="right" class="cb-control navigate navigate-right">
|
||||||
<span class="icon-arrow-right"></span>
|
<span class="icon-arrow-right"></span>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue