updated todo + minor tweaks...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2014-01-13 03:38:06 +04:00
parent f571999944
commit 71141dd571
4 changed files with 39 additions and 11 deletions

View File

@ -109,7 +109,22 @@ Roadmap
[_] 31% Gen 3 current todo
[_] 63% High priority
[_] 62% High priority
[_] BUG: sorting breaks when at or near the end of a ribbon...
|
| Procedure:
| - go to end of a ribbon
| - shift-s
| - select a sort method
| - click "OK"
|
| NOTE: this will not break of sorting will not change the order of
| visible images...
| thus, if this the above procedure does not break do one of:
| - ctrl-r (reverse) before sorting
| - check "Descending" in the sort dialog
| NOTE: this breaks because current the current image is not
| yet loaded/created when reloadViewer(..) tries to focus it...
[_] BUG: panels: open/close events get triggered on panel drag/sort...
[_] buildcache: add option to control image sort...
[_] ASAP: Need visual indicators for long operations...
@ -254,6 +269,17 @@ Roadmap
[_] 0% metadata
[_] comment
[_] tags
[_] BUG: sorting mis-aligns ribbons in some cases...
| Example:
| oooo... --[reverse]-> ...oooo
| ...oooo[o]oooo... ...oooo[o]oooo...
|
| Should be:
| oooo... --[reverse]-> ...oooo
| ...oooo[o]oooo... ...oooo[o]oooo...
|
| The above can happen when, for example, sorting the images via data
| and then sorting them in the same way with reverse checked...
[_] BUG: opening a dir form history sometimes loads wrong size previews
| this happens in part of the view and a refresh, reload or image
| update (updateImages()) fixes the issue...

View File

@ -2165,7 +2165,8 @@ function reloadViewer(reuse_current_structure, images_per_screen){
loadImagesAround(Math.round(w * CONFIG.load_screens), current, i)
})
focusImage(getImage(current))
// XXX this sometimes is called BEFORE the current image is done loading...
focusImage(current)
fitNImages(w)
centerRibbons('css')

View File

@ -179,9 +179,6 @@ function chainCmp(cmp_chain){
// Sort action generator...
//
function sortVia(cmp){
if(cmp.constructor.name == 'Array'){
cmp = chainCmp(cmp)
}
return function(reverse){
return sortImages(cmp, reverse)
}
@ -216,11 +213,17 @@ function reverseImageOrder(){
}
// Sort images...
//
// NOTE: cmp can be a list of cmp functions, in this case they will be
// chained (see: chainCmp(..) for more details)
// NOTE: using imageOrderCmp as a cmp function here will yield odd
// results -- in-place sorting a list based on relative element
// positions within itself is fun ;)
function sortImages(cmp, reverse){
cmp = cmp == null ? imageDateCmp : cmp
cmp = cmp.constructor.name == 'Array' ? chainCmp(cmp) : cmp
DATA.order.sort(cmp)
if(reverse){
DATA.order.reverse()
@ -237,11 +240,10 @@ var sortImagesByDate = sortVia(imageDateCmp)
var sortImagesByFileName = sortVia(imageNameCmp)
var sortImagesByFileSeqOrName = sortVia(imageSeqOrNameCmp)
var sortImagesByFileNameXPStyle = sortVia(imageXPStyleFileNameCmp)
var sortImagesByDateOrSeqOrName = sortVia(chainCmp([
var sortImagesByDateOrSeqOrName = sortVia([
imageDateCmp,
imageSeqOrNameCmp
]))
])
// Sort images by name while taking into account sequence overflows
@ -390,7 +392,7 @@ function horizontalShiftImage(image, direction){
updateImages()
dataUpdated()
$('.viewer').trigger('horizontalSiftedImage', [gid, direction])
$('.viewer').trigger('horizontalShiftedImage', [gid, direction])
return image
}
@ -434,7 +436,6 @@ function sortImagesDialog(){
res = res[alg]
if(/Date/i.test(res)){
//var method = sortImagesByDate
var method = sortImagesByDateOrSeqOrName
} else if(/File name/i.test(res)){

View File

@ -1335,7 +1335,7 @@ function setupUI(viewer){
'focusingImage',
'fittingImages',
//'updatingImageProportions',
'horizontalSiftedImage',
'horizontalShiftedImage',
].join(' '),
function(){
updateCurrentMarker()