mirror of
https://github.com/flynx/PortableMag.git
synced 2025-10-31 20:10:13 +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
|
Page
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="page">
|
<div class="page no-resize">
|
||||||
<div class="content">
|
<div class="content" style="background:yellow; width: 600px">
|
||||||
Page
|
Page
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="page">
|
<div class="page no-resize">
|
||||||
<div class="content">
|
<div class="content" style="background:gold; width: 400px">
|
||||||
Page
|
Page
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="page">
|
<div class="page no-resize">
|
||||||
<div class="content">
|
<div class="content" style="background:orange; width: 200px">
|
||||||
Page
|
Page
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -27,6 +27,8 @@ body {
|
|||||||
text-align: left;
|
text-align: left;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
|
||||||
|
text-align: center;
|
||||||
|
|
||||||
width: auto;
|
width: auto;
|
||||||
height: auto;
|
height: auto;
|
||||||
/* XXX change to relative units... */
|
/* XXX change to relative units... */
|
||||||
@ -64,7 +66,6 @@ body {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.page-view-mode .page {
|
.page-view-mode .page {
|
||||||
text-align: center;
|
|
||||||
|
|
||||||
/* XXX change to relative units... */
|
/* XXX change to relative units... */
|
||||||
width: 800px;
|
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
|
// XXX this produces a funny animation that gets more ampletude the farther
|
||||||
// we get to the right from the no-resize element...
|
// we get to the right from the no-resize element...
|
||||||
// ...think the reason is .no-resize page centering...
|
// ...think the reason is .no-resize page centering...
|
||||||
var _USE_REAL_SIZES = true
|
// XXX still buggy on togglePageView to TN after funny sized pages...
|
||||||
//var _USE_REAL_SIZES = false
|
//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...
|
// this point, as we will start changing things next...
|
||||||
|
|
||||||
if(fit_to_content){
|
if(fit_to_content){
|
||||||
page.width(cW)
|
if(_USE_REAL_SIZES){
|
||||||
page.height(cH)
|
page.width('auto')
|
||||||
|
page.height('auto')
|
||||||
|
} else {
|
||||||
|
page.width(cW)
|
||||||
|
page.height(cH)
|
||||||
|
}
|
||||||
if(W/H > (cW*n)/cH){
|
if(W/H > (cW*n)/cH){
|
||||||
scale = H/cH
|
scale = H/cH
|
||||||
} else {
|
} else {
|
||||||
@ -266,6 +272,7 @@ function fitNPages(n, fit_to_content){
|
|||||||
var offset = rW * i-1
|
var offset = rW * i-1
|
||||||
// now do the unresized elements...
|
// now do the unresized elements...
|
||||||
if(_USE_REAL_SIZES){
|
if(_USE_REAL_SIZES){
|
||||||
|
$('.page.no-resize').width('auto')
|
||||||
var nrpages = $('.page.no-resize, .current.page')
|
var nrpages = $('.page.no-resize, .current.page')
|
||||||
i = nrpages.index(cur)
|
i = nrpages.index(cur)
|
||||||
nrpages.splice(i)
|
nrpages.splice(i)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user