mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-29 10:20:08 +00:00
minor refactoring...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
ecf8a762ff
commit
0b3ad6d5b4
@ -51,8 +51,7 @@ function setup(){
|
||||
setBackgroundMode('dark')
|
||||
|
||||
// setup event handlers...
|
||||
setupKeyboard()
|
||||
setupGestures()
|
||||
setupEvents()
|
||||
setupControlElements()
|
||||
|
||||
// XXX
|
||||
|
||||
@ -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,
|
||||
|
||||
@ -48,8 +48,7 @@ function setup(){
|
||||
setBackgroundMode('dark')
|
||||
|
||||
// setup event handlers...
|
||||
setupKeyboard()
|
||||
setupGestures()
|
||||
setupEvents()
|
||||
setupControlElements()
|
||||
|
||||
// XXX
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user