Merge branch 'master' into thumbs
Conflicts: examples/dev.html lib/ComicBook.js
This commit is contained in:
commit
50e84662d9
20 changed files with 46 additions and 28 deletions
|
@ -1,29 +1,5 @@
|
|||
/* exported ComicBook */
|
||||
|
||||
/*
|
||||
TODOs:
|
||||
|
||||
Fo sho:
|
||||
- create onclose callback, show close button only if set
|
||||
- fix progress bar css
|
||||
- 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
|
||||
- full browser test - IE9 / FF3.6+ / Chrome / Safari / Opera
|
||||
|
||||
Nice 2 have:
|
||||
- remove image inhancement lag when navigating by pre-applying enhancements to other pages
|
||||
- jump to page?
|
||||
- make page draggable with the cursor
|
||||
- enable menu items via config, allow for custom items
|
||||
- split out classes into seperate files
|
||||
- refactor so we are not using all these loose shared variables and other nastyness
|
||||
- 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 ($) {
|
||||
|
||||
'use strict';
|
||||
|
@ -91,7 +67,7 @@ var ComicBook = (function ($) {
|
|||
this.isMobile = false;
|
||||
|
||||
// mobile enhancements
|
||||
if (navigator.userAgent.match(/mobile/i)) {
|
||||
if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini|Mobile/i.test(navigator.userAgent)) {
|
||||
this.isMobile = true;
|
||||
document.body.classList.add('mobile');
|
||||
defaults.displayMode = 'single';
|
||||
|
@ -198,6 +174,9 @@ var ComicBook = (function ($) {
|
|||
|
||||
window.addEventListener('touchstart', function (e) {
|
||||
var $el = $(e.target);
|
||||
if ($el.attr('id') === 'comic') {
|
||||
self.toggleToolbar();
|
||||
}
|
||||
if ($el.data('toggle') === 'dropdown' ) {
|
||||
$el.siblings('.dropdown').toggle();
|
||||
}
|
||||
|
@ -896,6 +875,10 @@ var ComicBook = (function ($) {
|
|||
});
|
||||
};
|
||||
|
||||
ComicBook.prototype.toggleToolbar = function () {
|
||||
self.toggleControl('toolbar');
|
||||
};
|
||||
|
||||
ComicBook.prototype.destroy = function () {
|
||||
|
||||
$.each(this.controls, function (name, $control) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue