mirror of
https://github.com/flynx/PortableMag.git
synced 2025-10-29 03:00:09 +00:00
more playing with page sizes (still flaky)...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
3d46e952d2
commit
1dcb9095c9
12
index.html
12
index.html
@ -299,18 +299,18 @@ $(document).ready(function(){
|
||||
Page
|
||||
</div>
|
||||
</div>
|
||||
<div class="page">
|
||||
<div class="content">
|
||||
<div class="page no-resize">
|
||||
<div class="content" style="background:yellow; width: 600px">
|
||||
Page
|
||||
</div>
|
||||
</div>
|
||||
<div class="page">
|
||||
<div class="content">
|
||||
<div class="page no-resize">
|
||||
<div class="content" style="background:gold; width: 400px">
|
||||
Page
|
||||
</div>
|
||||
</div>
|
||||
<div class="page">
|
||||
<div class="content">
|
||||
<div class="page no-resize">
|
||||
<div class="content" style="background:orange; width: 200px">
|
||||
Page
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -27,6 +27,8 @@ body {
|
||||
text-align: left;
|
||||
overflow: hidden;
|
||||
|
||||
text-align: center;
|
||||
|
||||
width: auto;
|
||||
height: auto;
|
||||
/* XXX change to relative units... */
|
||||
@ -64,7 +66,6 @@ body {
|
||||
}
|
||||
|
||||
.page-view-mode .page {
|
||||
text-align: center;
|
||||
|
||||
/* XXX change to relative units... */
|
||||
width: 800px;
|
||||
|
||||
15
magazine.js
15
magazine.js
@ -22,8 +22,9 @@ var DRAG_FULL_PAGE = false
|
||||
// XXX this produces a funny animation that gets more ampletude the farther
|
||||
// we get to the right from the no-resize element...
|
||||
// ...think the reason is .no-resize page centering...
|
||||
var _USE_REAL_SIZES = true
|
||||
//var _USE_REAL_SIZES = false
|
||||
// XXX still buggy on togglePageView to TN after funny sized pages...
|
||||
//var _USE_REAL_SIZES = true
|
||||
var _USE_REAL_SIZES = false
|
||||
|
||||
|
||||
/*********************************************************************/
|
||||
@ -219,8 +220,13 @@ function fitNPages(n, fit_to_content){
|
||||
// this point, as we will start changing things next...
|
||||
|
||||
if(fit_to_content){
|
||||
page.width(cW)
|
||||
page.height(cH)
|
||||
if(_USE_REAL_SIZES){
|
||||
page.width('auto')
|
||||
page.height('auto')
|
||||
} else {
|
||||
page.width(cW)
|
||||
page.height(cH)
|
||||
}
|
||||
if(W/H > (cW*n)/cH){
|
||||
scale = H/cH
|
||||
} else {
|
||||
@ -266,6 +272,7 @@ function fitNPages(n, fit_to_content){
|
||||
var offset = rW * i-1
|
||||
// now do the unresized elements...
|
||||
if(_USE_REAL_SIZES){
|
||||
$('.page.no-resize').width('auto')
|
||||
var nrpages = $('.page.no-resize, .current.page')
|
||||
i = nrpages.index(cur)
|
||||
nrpages.splice(i)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user