mirror of
https://github.com/flynx/PortableMag.git
synced 2025-10-29 11:10:08 +00:00
moved the resize handler to a seporate function...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
eb197ec6e2
commit
5994158f24
15
index.html
15
index.html
@ -26,20 +26,7 @@ $(document).ready(function(){
|
||||
|
||||
|
||||
$(window)
|
||||
.resize(function() {
|
||||
// XXX might be good to compensate for document zoom...
|
||||
if(document.width/$(document).width() != 1){
|
||||
// XXX scale the page...
|
||||
console.log('>>> Page Zoom:', document.width/$(document).width())
|
||||
}
|
||||
//$('.splash').show()
|
||||
if(ANIMATE_WINDOW_RESIZE){
|
||||
updateView()
|
||||
} else {
|
||||
unanimated($('.scaler'), updateView, 30)()
|
||||
}
|
||||
//$('.splash').fadeOut()
|
||||
})
|
||||
.resize(viewResizeHandler)
|
||||
.bind('hashchange', hashChangeHandler)
|
||||
|
||||
$('.viewer')
|
||||
|
||||
15
magazine.js
15
magazine.js
@ -90,6 +90,21 @@ function hashChangeHandler(e){
|
||||
}
|
||||
}
|
||||
|
||||
function viewResizeHandler(){
|
||||
// XXX might be good to compensate for document zoom...
|
||||
if(document.width/$(document).width() != 1){
|
||||
// XXX scale the page...
|
||||
console.log('>>> Page Zoom:', document.width/$(document).width())
|
||||
}
|
||||
//$('.splash').show()
|
||||
if(ANIMATE_WINDOW_RESIZE){
|
||||
updateView()
|
||||
} else {
|
||||
unanimated($('.scaler'), updateView, 30)()
|
||||
}
|
||||
//$('.splash').fadeOut()
|
||||
}
|
||||
|
||||
|
||||
// swipe state handler
|
||||
// this handles single and double finger swipes and dragging
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user