mirror of
https://github.com/flynx/PortableMag.git
synced 2025-12-23 20:11:46 +00:00
made the layout.html's getPageNumber compatible with the main implementation in magazine.js...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
0abaece2ca
commit
76499b6c8f
@ -45,7 +45,10 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
function getPageNumber(){
|
function getPageNumber(page){
|
||||||
|
if(page != null){
|
||||||
|
return $('.page').index($(page))
|
||||||
|
} else {
|
||||||
var s = $('.viewer').scrollLeft()
|
var s = $('.viewer').scrollLeft()
|
||||||
var W = $('.viewer').width()
|
var W = $('.viewer').width()
|
||||||
var cur = -1
|
var cur = -1
|
||||||
@ -57,6 +60,7 @@ function getPageNumber(){
|
|||||||
})
|
})
|
||||||
cur = res.index(Math.min.apply(Math, res))
|
cur = res.index(Math.min.apply(Math, res))
|
||||||
return cur
|
return cur
|
||||||
|
}
|
||||||
}
|
}
|
||||||
function setCurrentPage(n){
|
function setCurrentPage(n){
|
||||||
if(n == null){
|
if(n == null){
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user