parent
c1df87582d
commit
350dd4bb0e
12
melpomene.js
12
melpomene.js
|
@ -180,11 +180,11 @@ function getPagesCount() {
|
|||
}
|
||||
|
||||
function pageOriginalHeight(pageNumber) {
|
||||
return READER_PAGES.children[pageNumber - 1].height
|
||||
return READER_PAGES.children[pageNumber - 1].naturalHeight
|
||||
}
|
||||
|
||||
function pageOriginalWidth(pageNumber) {
|
||||
return READER_PAGES.children[pageNumber - 1].width
|
||||
return READER_PAGES.children[pageNumber - 1].naturalWidth
|
||||
}
|
||||
|
||||
function readerFrameRatio() {
|
||||
|
@ -192,15 +192,15 @@ function readerFrameRatio() {
|
|||
}
|
||||
|
||||
function pageRatio(pageNumber) {
|
||||
return READER_PAGES.children[pageNumber - 1].width / READER_PAGES.children[pageNumber - 1].height
|
||||
return READER_PAGES.children[pageNumber - 1].naturalWidth / READER_PAGES.children[pageNumber - 1].naturalHeight
|
||||
}
|
||||
|
||||
function pageMaxHeight(){
|
||||
let max_height = 0
|
||||
|
||||
for (var i = 0; i < READER_PAGES.children.length; i++) {
|
||||
if(READER_PAGES.children[i].height > max_height){
|
||||
max_height = READER_PAGES.children[i].height
|
||||
if(READER_PAGES.children[i].naturalHeight > max_height){
|
||||
max_height = READER_PAGES.children[i].naturalHeight
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -217,7 +217,7 @@ function previousPagesWidth(pageNumber) {
|
|||
let totalWidth = 0
|
||||
|
||||
for (let idx = 0; idx < pageNumber - 1; idx++){
|
||||
totalWidth = totalWidth + READER_PAGES.children[idx].width
|
||||
totalWidth = totalWidth + READER_PAGES.children[idx].naturalWidth
|
||||
}
|
||||
|
||||
return totalWidth
|
||||
|
|
Loading…
Reference in New Issue