mirror of
https://github.com/flynx/PortableMag.git
synced 2025-12-20 18:41: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)}))
|
function(k){console.log(k)}))
|
||||||
|
|
||||||
/*
|
$('.viewer')
|
||||||
|
.on('mouseup touchend', function(evt){
|
||||||
|
setCurrentPage()
|
||||||
|
})
|
||||||
|
|
||||||
if(!NAVIGATE_RELATIVE_TO_VISIBLE){
|
if(!NAVIGATE_RELATIVE_TO_VISIBLE){
|
||||||
$('.viewer').css({overflow: 'hidden'})
|
$('.viewer').css({overflow: 'hidden'})
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
|
|
||||||
// expand the templates...
|
// expand the templates...
|
||||||
runMagazineTemplates()
|
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
|
var USE_PAGE_ALIGN = true
|
||||||
|
|
||||||
@ -78,11 +79,16 @@ var togglePageView = createCSSClassToggler(
|
|||||||
/********************************************************* helpers ***/
|
/********************************************************* helpers ***/
|
||||||
|
|
||||||
function getPageNumber(page){
|
function getPageNumber(page){
|
||||||
|
// a page is given...
|
||||||
if(page != null){
|
if(page != null){
|
||||||
return $('.page').index($(page))
|
return $('.page').index($(page))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// get the next page...
|
||||||
if(!NAVIGATE_RELATIVE_TO_VISIBLE){
|
if(!NAVIGATE_RELATIVE_TO_VISIBLE){
|
||||||
return $('.page').index($('.current.page'))
|
return $('.page').index($('.current.page'))
|
||||||
|
|
||||||
|
// get the closest page to view...
|
||||||
} else {
|
} else {
|
||||||
// XXX this gets crazy when magazine is scaled...
|
// XXX this gets crazy when magazine is scaled...
|
||||||
var s = $('.viewer').scrollLeft()
|
var s = $('.viewer').scrollLeft()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user