minor refactoring...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2012-08-06 16:24:20 +04:00
parent ecf8a762ff
commit 0b3ad6d5b4
3 changed files with 9 additions and 15 deletions

View File

@ -51,8 +51,7 @@ function setup(){
setBackgroundMode('dark')
// setup event handlers...
setupKeyboard()
setupGestures()
setupEvents()
setupControlElements()
// XXX

View File

@ -76,23 +76,19 @@ function setDefaultInitialState(){
if($('.current.image').length == 0){
$('.current.ribbon').children('.image').first().addClass('current')
}
}
function setupEvents(){
// resize...
$(window).resize(function() {
// XXX HACK
$('.current.image').click()
})
}
function setupKeyboard(){
// keyboard...
$(document)
.keydown(handleKeys)
}
function setupGestures(){
// swipe...
$('.viewer')
.swipe({
swipeLeft: nextImage,

View File

@ -48,8 +48,7 @@ function setup(){
setBackgroundMode('dark')
// setup event handlers...
setupKeyboard()
setupGestures()
setupEvents()
setupControlElements()
// XXX