mirror of
https://github.com/flynx/PortableMag.git
synced 2025-10-29 19:20:09 +00:00
disabled fitting for now...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
e518e0bc65
commit
c3906bbb2a
25
index.html
25
index.html
@ -177,18 +177,18 @@ togglePageView = createCSSClassToggler(
|
|||||||
function(){
|
function(){
|
||||||
if(togglePageView('?') == 'on'){
|
if(togglePageView('?') == 'on'){
|
||||||
PAGES_VISIBLE = 1
|
PAGES_VISIBLE = 1
|
||||||
fitPagesToViewer(PAGES_VISIBLE)
|
//fitPagesToViewer(PAGES_VISIBLE)
|
||||||
//fitNPages(PAGES_VISIBLE)
|
fitNPages(PAGES_VISIBLE)
|
||||||
// to prevent drag while zooming to affect
|
// to prevent drag while zooming to affect
|
||||||
// the resulting position set it to current
|
// the resulting position set it to current
|
||||||
// page...
|
// page...
|
||||||
// XXX now this is done by fitNPages
|
// XXX now this is done by fitNPages
|
||||||
//setCurrentPage()
|
setCurrentPage()
|
||||||
} else {
|
} else {
|
||||||
PAGES_VISIBLE = PAGES_IN_RIBBON
|
PAGES_VISIBLE = PAGES_IN_RIBBON
|
||||||
// XXX this needs to be done before transitions...
|
// XXX this needs to be done before transitions...
|
||||||
fitPagesToContent(PAGES_VISIBLE)
|
//fitPagesToContent(PAGES_VISIBLE)
|
||||||
//fitNPages(PAGES_VISIBLE)
|
fitNPages(PAGES_VISIBLE)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -197,7 +197,6 @@ function getPageScale(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
function fitNPages(n){
|
function fitNPages(n){
|
||||||
/*
|
|
||||||
if(n==null){
|
if(n==null){
|
||||||
n = 1
|
n = 1
|
||||||
}
|
}
|
||||||
@ -216,11 +215,13 @@ function fitNPages(n){
|
|||||||
}
|
}
|
||||||
|
|
||||||
setElementScale($('.scaler'), scale)
|
setElementScale($('.scaler'), scale)
|
||||||
*/
|
|
||||||
|
|
||||||
|
/*
|
||||||
fitPagesTo(null, n)
|
fitPagesTo(null, n)
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
// NOTE: this is a single big function because we need to thread data
|
// NOTE: this is a single big function because we need to thread data
|
||||||
// through to avoid sampling while animating...
|
// through to avoid sampling while animating...
|
||||||
// XXX try and do the fitting with pure CSS...
|
// XXX try and do the fitting with pure CSS...
|
||||||
@ -280,16 +281,16 @@ function fitPagesTo(elem, n){
|
|||||||
var scale = vW/(rW*n)
|
var scale = vW/(rW*n)
|
||||||
// or scale vertically if needed...
|
// or scale vertically if needed...
|
||||||
// XXX broken
|
// XXX broken
|
||||||
/*
|
//if(rH*scale > vH){
|
||||||
if(rH*scale > vH){
|
// scale = vH/rH
|
||||||
scale = vH/rH
|
//}
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
setElementScale($('.scaler'), scale)
|
setElementScale($('.scaler'), scale)
|
||||||
// update position using the new width...
|
// update position using the new width...
|
||||||
setCurrentPage(null, rW)
|
setCurrentPage(null, rW)
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
function fitPagesToViewer(n){
|
function fitPagesToViewer(n){
|
||||||
fitPagesTo('.viewer', n)
|
fitPagesTo('.viewer', n)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user