mirror of
https://github.com/flynx/PortableMag.git
synced 2025-12-20 10:31:46 +00:00
more work on scrolling...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
eb19688eb6
commit
ac80871bb8
@ -86,11 +86,14 @@ $(document).ready(function(){
|
||||
},
|
||||
function(k){console.log(k)}))
|
||||
|
||||
/*
|
||||
$('.viewer')
|
||||
.on('mouseup touchend', function(evt){
|
||||
setCurrentPage()
|
||||
})
|
||||
|
||||
if(!NAVIGATE_RELATIVE_TO_VISIBLE){
|
||||
$('.viewer').css({overflow: 'hidden'})
|
||||
}
|
||||
*/
|
||||
|
||||
// expand the templates...
|
||||
runMagazineTemplates()
|
||||
|
||||
@ -4,7 +4,8 @@
|
||||
*
|
||||
**********************************************************************/
|
||||
|
||||
var NAVIGATE_RELATIVE_TO_VISIBLE = false
|
||||
//var NAVIGATE_RELATIVE_TO_VISIBLE = false
|
||||
var NAVIGATE_RELATIVE_TO_VISIBLE = true
|
||||
|
||||
var USE_PAGE_ALIGN = true
|
||||
|
||||
@ -78,11 +79,16 @@ var togglePageView = createCSSClassToggler(
|
||||
/********************************************************* helpers ***/
|
||||
|
||||
function getPageNumber(page){
|
||||
// a page is given...
|
||||
if(page != null){
|
||||
return $('.page').index($(page))
|
||||
}
|
||||
|
||||
// get the next page...
|
||||
if(!NAVIGATE_RELATIVE_TO_VISIBLE){
|
||||
return $('.page').index($('.current.page'))
|
||||
|
||||
// get the closest page to view...
|
||||
} else {
|
||||
// XXX this gets crazy when magazine is scaled...
|
||||
var s = $('.viewer').scrollLeft()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user