diff --git a/index.html b/index.html
index f5c629d..23b20c9 100755
--- a/index.html
+++ b/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')
diff --git a/magazine.js b/magazine.js
index 89bce23..11e6d4b 100755
--- a/magazine.js
+++ b/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