added sorting images by path...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2012-08-14 20:12:30 +04:00
parent 41361bffa7
commit 63708b60f4
2 changed files with 16 additions and 4 deletions

View File

@ -114,7 +114,7 @@ Priority work
[X] disable transitions...
[_] basic wrapper
| hook-in os-specific API
[_] 25% Preview II (optional features)
[_] 28% Preview II (optional features)
[_] slideshow...
[_] 50% serialization/deserialization
[X] JSON loader/unloader
@ -155,10 +155,11 @@ Priority work
[_] double tap/click to zoom (a-la iPad)
| fit <-> actual pixels (max)
[_] pinch to zoom
[_] 66% add sort/re-sort capability...
[X] 100% add sort/re-sort capability...
[X] abstract out image id
[_] replace id (use something else like filename)
[X] in-place sort ribbons
[X] replace id (use something else like filename)
[X] re-arrange ribbons (reverse)
[X] in-place sort images in ribbons
[_] 50% option to disable processor intensive features
[X] global transitions
[_] global opacity -- do a layout without opacity

View File

@ -1132,6 +1132,17 @@ function resortImagesVia(cmp){
}
// sort images py their full path...
// XXX this should use a normalized path...
function sortImagesByPath(){
resortImagesVia(function(a, b){
a = $(a).css('background-image')
b = $(b).css('background-image')
return a > b ? 1 : a < b ? -1 : 0
})
}
// reverse the order of images in all ribbons by reversing their id attr
// and resorting...
// NOTE: this is like flipping the field horizontally...