only emit navigate event when loading a new page

This commit is contained in:
Bala Clark 2013-08-19 22:28:43 +02:00
parent 48afb3dd96
commit a1e8d77182

View file

@ -5,8 +5,7 @@
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
- only trigger navigate event on page change (not resize, etc.)
- fix manga mode - 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.
@ -23,7 +22,7 @@
- refactor so we are not using all these loose shared variables and other nastyness - refactor so we are not using all these loose shared variables and other nastyness
- 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 sticky - allow toolbar to be hidden on mobile (maybe show a small translucent button that opens the toolbar when clicked)
*/ */
var ComicBook = (function ($) { var ComicBook = (function ($) {
@ -577,7 +576,9 @@ var ComicBook = (function ($) {
$('.navigate-right').hide(); $('.navigate-right').hide();
} }
if (pointer !== getHash()){
$(this).trigger('navigate'); $(this).trigger('navigate');
}
// update hash location // update hash location
if (getHash() !== pointer) { if (getHash() !== pointer) {