mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-30 02:40:08 +00:00
added directional awareness for shift operations (makes things more natural)...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
73f5541d22
commit
d24a113152
28
ui/TODO.otl
28
ui/TODO.otl
@ -1,5 +1,5 @@
|
|||||||
Priority work
|
Priority work
|
||||||
[_] 71% Preview II
|
[_] 81% Preview II
|
||||||
[_] 91% dynamic loading of images
|
[_] 91% dynamic loading of images
|
||||||
[_] 83% stream on navigate
|
[_] 83% stream on navigate
|
||||||
| parameters that affect loading:
|
| parameters that affect loading:
|
||||||
@ -30,7 +30,7 @@ Priority work
|
|||||||
[X] update ui structure (handle navigate/move events)
|
[X] update ui structure (handle navigate/move events)
|
||||||
[X] sizes on zoom
|
[X] sizes on zoom
|
||||||
| still needs work...
|
| still needs work...
|
||||||
[_] make shift up/down direction-aware...
|
[X] make shift up/down direction-aware...
|
||||||
| i.e. if we are going through images in a direction select the
|
| i.e. if we are going through images in a direction select the
|
||||||
| next image in that direction when shifting...
|
| next image in that direction when shifting...
|
||||||
[_] 57% save state
|
[_] 57% save state
|
||||||
@ -177,7 +177,8 @@ Priority work
|
|||||||
[X] 100% actions
|
[X] 100% actions
|
||||||
[X] bug: shifting up to new ribbon pushes the current row down...
|
[X] bug: shifting up to new ribbon pushes the current row down...
|
||||||
| before starting on a fix, need to cleanup the code from old hacks and workarounds...
|
| before starting on a fix, need to cleanup the code from old hacks and workarounds...
|
||||||
[_] 40% Preview II (optional features)
|
[_] 45% Preview II (optional features)
|
||||||
|
[_] mark positions and jump between marks (a-la vim's "m"/"'" commands)
|
||||||
[_] 0% PhoneGap + Android Issues:
|
[_] 0% PhoneGap + Android Issues:
|
||||||
[_] scrolling in overlays does not work
|
[_] scrolling in overlays does not work
|
||||||
[_] half the keyboard is not working...
|
[_] half the keyboard is not working...
|
||||||
@ -188,10 +189,9 @@ Priority work
|
|||||||
[_] slideshow...
|
[_] slideshow...
|
||||||
[_] make keyboeard handler mode-aware...
|
[_] make keyboeard handler mode-aware...
|
||||||
| this is needed to disable navigation keys in setup-mode, for example...
|
| this is needed to disable navigation keys in setup-mode, for example...
|
||||||
[_] 50% serialization/deserialization
|
[X] 100% serialization/deserialization
|
||||||
[X] JSON loader/unloader
|
[X] JSON loader/unloader
|
||||||
[_] file reader/writer
|
[X] file reader/writer
|
||||||
[_] actual file loading (Target-specific)
|
|
||||||
[X] flip ribbons relative to current -- reverse order
|
[X] flip ribbons relative to current -- reverse order
|
||||||
[_] fade transition in single image mode...
|
[_] fade transition in single image mode...
|
||||||
[_] "show all promoted/demoted images" mode
|
[_] "show all promoted/demoted images" mode
|
||||||
@ -251,24 +251,20 @@ Priority work
|
|||||||
[_] 50% option to disable processor intensive features
|
[_] 50% option to disable processor intensive features
|
||||||
[X] global transitions
|
[X] global transitions
|
||||||
[_] global opacity -- do a layout without opacity
|
[_] global opacity -- do a layout without opacity
|
||||||
[_] make scrolling of other ribbons proportional to the gap...
|
[X] 100% refactoring (low priority)
|
||||||
[_] 66% refactoring (low priority)
|
|
||||||
[X] cleanup legacy workarounds
|
[X] cleanup legacy workarounds
|
||||||
[X] ui.js, gallery-prototype.js either merge or revise split logic
|
[X] ui.js, gallery-prototype.js either merge or revise split logic
|
||||||
[_] do a redraw function
|
[_] make scrolling of other ribbons proportional to the gap...
|
||||||
| this should position all the elements correctly within the
|
[_] 22% Preview III
|
||||||
| current ui state...
|
|
||||||
|
|
|
||||||
| currently all operations that alter the layout call $('.current.image').click()
|
|
||||||
[_] 0% Preview III
|
|
||||||
[_] collection management
|
[_] collection management
|
||||||
[_] actual file loading
|
[_] actual file loading
|
||||||
[_] revise controls...
|
[_] revise controls...
|
||||||
[_] dynamic image/preview swap for zooming
|
[X] dynamic image/preview swap for zooming
|
||||||
| important to make 1:1 previews for all main views and zoom levels...
|
| important to make 1:1 previews for all main views and zoom levels...
|
||||||
| also need to make this as device-neutral as possible...
|
| also need to make this as device-neutral as possible...
|
||||||
[_] dynamic image loading/unloading to very large ribbons
|
[X] dynamic image loading/unloading to very large ribbons
|
||||||
| it is important to make this far enough from the curent view for the user not to notice anything...
|
| it is important to make this far enough from the curent view for the user not to notice anything...
|
||||||
|
[_] dynamic structure construction and partial state (for infinite ribbons)
|
||||||
[_] 0% view modes
|
[_] 0% view modes
|
||||||
[_] grid mode
|
[_] grid mode
|
||||||
[_] calendar mode
|
[_] calendar mode
|
||||||
|
|||||||
@ -32,6 +32,12 @@
|
|||||||
opacity: 0.5;
|
opacity: 0.5;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* CSS visibility to make the load on the browser less */
|
||||||
|
|
||||||
|
.image:nth-child(3) ~ .image {
|
||||||
|
background: red;
|
||||||
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -296,6 +296,14 @@ ImageGrid.GROUP('State',
|
|||||||
title: 'History depth.',
|
title: 'History depth.',
|
||||||
value: 10,
|
value: 10,
|
||||||
}),
|
}),
|
||||||
|
ImageGrid.OPTION({
|
||||||
|
name: 'LAST_MOVE_DIRECTION',
|
||||||
|
title: 'Direction the last move was made to',
|
||||||
|
doc: 'Used to naturally position the current image after '+
|
||||||
|
'shift up/down operations.',
|
||||||
|
value: 'next',
|
||||||
|
display: false,
|
||||||
|
}),
|
||||||
/*
|
/*
|
||||||
// XXX is this the correct way to go...
|
// XXX is this the correct way to go...
|
||||||
ImageGrid.OPTION({
|
ImageGrid.OPTION({
|
||||||
@ -1873,12 +1881,14 @@ ImageGrid.GROUP('Navigation',
|
|||||||
title: 'Go to previous image',
|
title: 'Go to previous image',
|
||||||
},
|
},
|
||||||
function prevImage(){
|
function prevImage(){
|
||||||
|
ImageGrid.option.LAST_MOVE_DIRECTION = 'prev'
|
||||||
return $('.current.image').prev('.image').click()
|
return $('.current.image').prev('.image').click()
|
||||||
}),
|
}),
|
||||||
ImageGrid.ACTION({
|
ImageGrid.ACTION({
|
||||||
title: 'Go to next image',
|
title: 'Go to next image',
|
||||||
},
|
},
|
||||||
function nextImage(){
|
function nextImage(){
|
||||||
|
ImageGrid.option.LAST_MOVE_DIRECTION = 'next'
|
||||||
return $('.current.image').next('.image').click()
|
return $('.current.image').next('.image').click()
|
||||||
}),
|
}),
|
||||||
ImageGrid.ACTION({
|
ImageGrid.ACTION({
|
||||||
@ -2135,15 +2145,17 @@ ImageGrid.GROUP('Image manipulation',
|
|||||||
|
|
||||||
// get previous element after which we need to put the current...
|
// get previous element after which we need to put the current...
|
||||||
var prev_elem = getImageBefore(
|
var prev_elem = getImageBefore(
|
||||||
get_order($('.current.image')),
|
get_order($('.current.image')),
|
||||||
$('.current.ribbon')[direction]('.ribbon'))
|
$('.current.ribbon')[direction]('.ribbon'))
|
||||||
|
|
||||||
// last image in ribbon, merge...
|
// last image in ribbon, merge...
|
||||||
if($('.current.ribbon').children('.image').length == 1){
|
if($('.current.ribbon').children('.image').length == 1){
|
||||||
ImageGrid.mergeRibbons(direction)
|
ImageGrid.mergeRibbons(direction)
|
||||||
} else {
|
} else {
|
||||||
img = $('.current.image')
|
img = $('.current.image')
|
||||||
if(img.next('.image').length == 0){
|
// XXX how will this behave if we are at the last image in ribbon???
|
||||||
|
if((ImageGrid.option.LAST_MOVE_DIRECTION == 'prev' && img.prev('.image').length != 0)
|
||||||
|
|| (ImageGrid.option.LAST_MOVE_DIRECTION == 'next' && img.next('.image').length == 0)){
|
||||||
ImageGrid.prevImage()
|
ImageGrid.prevImage()
|
||||||
} else {
|
} else {
|
||||||
ImageGrid.nextImage()
|
ImageGrid.nextImage()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user