mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-30 19:00:09 +00:00
some refactoring and updated todo...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
c6257a335a
commit
fb302804ac
34
ui/TODO.otl
34
ui/TODO.otl
@ -84,8 +84,8 @@ Roadmap
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
[_] 24% Gen 3 current todo
|
[_] 25% Gen 3 current todo
|
||||||
[_] 49% High priority
|
[_] 50% High priority
|
||||||
[_] BUG: sometimes duplicate images get loaded...
|
[_] BUG: sometimes duplicate images get loaded...
|
||||||
| this happens when jumping back and forth on the mid ribbon until
|
| this happens when jumping back and forth on the mid ribbon until
|
||||||
| the last element shows up and then moving left until the frame
|
| the last element shows up and then moving left until the frame
|
||||||
@ -123,11 +123,11 @@ Roadmap
|
|||||||
[_] ASAP: test on Android...
|
[_] ASAP: test on Android...
|
||||||
[_] empty view (no data) usable...
|
[_] empty view (no data) usable...
|
||||||
[_] proper system init (start w.o. any data)
|
[_] proper system init (start w.o. any data)
|
||||||
[_] 58% image sorting (date/name/...)
|
[_] 75% image sorting (date/name/...)
|
||||||
[_] 66% sort by:
|
[X] 100% sort by:
|
||||||
[X] date
|
[X] date
|
||||||
[X] name
|
[X] name
|
||||||
[_] manual shift left/right/position
|
[X] manual shift left/right/position
|
||||||
| position shift is mark and shift here..
|
| position shift is mark and shift here..
|
||||||
[_] 50% Sort ui
|
[_] 50% Sort ui
|
||||||
[X] reverse
|
[X] reverse
|
||||||
@ -135,22 +135,12 @@ Roadmap
|
|||||||
[_] 50% Undo/Redo
|
[_] 50% Undo/Redo
|
||||||
[X] basic one step (revert to last save)
|
[X] basic one step (revert to last save)
|
||||||
[_] push/pop state stack
|
[_] push/pop state stack
|
||||||
[_] single ribbon mode
|
[_] 26% mark-based operations
|
||||||
| should this have up/down navigation?
|
|
||||||
|
|
|
||||||
| something like showGidsAsRibbon(gids) would be generic and logical...
|
|
||||||
[_] add ability to save/load ranges of images and the structures around them
|
|
||||||
| e.g.load image 100 to current ribbon -> will load 100 images
|
|
||||||
| for current ribbon and all the in between images from other
|
|
||||||
| ribbons above and below...
|
|
||||||
[_] build cache in background...
|
|
||||||
| this must be done while updating IMAGES live...
|
|
||||||
[_] 6% mark-based operations
|
|
||||||
[_] 33% cropping selection
|
[_] 33% cropping selection
|
||||||
[X] marked
|
[X] marked
|
||||||
[_] by tag/collection
|
[_] by tag/collection
|
||||||
[_] by group
|
[_] by group
|
||||||
[_] shift up/down
|
[X] shift up/down
|
||||||
[_] tag
|
[_] tag
|
||||||
[_] group
|
[_] group
|
||||||
| a group should behave as a single image but is
|
| a group should behave as a single image but is
|
||||||
@ -166,6 +156,16 @@ Roadmap
|
|||||||
| a list or a member image (primary).
|
| a list or a member image (primary).
|
||||||
[_] collection
|
[_] collection
|
||||||
| make or add to existing collection
|
| make or add to existing collection
|
||||||
|
[_] single ribbon mode
|
||||||
|
| should this have up/down navigation?
|
||||||
|
|
|
||||||
|
| something like showGidsAsRibbon(gids) would be generic and logical...
|
||||||
|
[_] add ability to save/load ranges of images and the structures around them
|
||||||
|
| e.g.load image 100 to current ribbon -> will load 100 images
|
||||||
|
| for current ribbon and all the in between images from other
|
||||||
|
| ribbons above and below...
|
||||||
|
[_] build cache in background...
|
||||||
|
| this must be done while updating IMAGES live...
|
||||||
[_] 0% grouping / meta-image
|
[_] 0% grouping / meta-image
|
||||||
[_] versions w. label image
|
[_] versions w. label image
|
||||||
| a set of images that is represented by one of the group
|
| a set of images that is represented by one of the group
|
||||||
|
|||||||
75
ui/data.js
75
ui/data.js
@ -1481,81 +1481,6 @@ function shiftImageRight(image){
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// XXX move to marks.js
|
|
||||||
|
|
||||||
// XXX need to account for empty ribbons...
|
|
||||||
function shiftMarkedImages(direction, mode, new_ribbon){
|
|
||||||
mode = mode == null ? 'ribbon' : mode
|
|
||||||
var cur = getRibbonIndex()
|
|
||||||
|
|
||||||
// ribbon only...
|
|
||||||
if(mode == 'ribbon'){
|
|
||||||
var ribbon = DATA.ribbons[cur]
|
|
||||||
// remove all the marked images form current ribbon...
|
|
||||||
var marked = $.map(MARKED, function(e){
|
|
||||||
var i = ribbon.indexOf(e)
|
|
||||||
if(i >= 0){
|
|
||||||
ribbon.splice(i, 1)
|
|
||||||
return e
|
|
||||||
}
|
|
||||||
return null
|
|
||||||
})
|
|
||||||
|
|
||||||
// shift all marked images...
|
|
||||||
} else {
|
|
||||||
var marked = MARKED.slice()
|
|
||||||
// remove all the marked images form all the ribbons...
|
|
||||||
$.each(DATA.ribbons, function(ribbon){
|
|
||||||
$.each(marked, function(e){
|
|
||||||
var i = ribbon.indexOf(e)
|
|
||||||
i >= 0 ? ribbon.splice(i, 1) : null
|
|
||||||
})
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// if we are at the top or bottom ribbons we need to create a new
|
|
||||||
// ribbon regardless...
|
|
||||||
if((cur == 0 && direction == 'prev')
|
|
||||||
|| (cur == DATA.ribbons.length-1 && direction == 'next')){
|
|
||||||
new_ribbon = true
|
|
||||||
}
|
|
||||||
|
|
||||||
// add marked to new ribbon...
|
|
||||||
if(new_ribbon){
|
|
||||||
cur += direction == 'next' ? 1 : 0
|
|
||||||
DATA.ribbons.splice(cur, 0, marked)
|
|
||||||
|
|
||||||
// add marked to existing ribbon...
|
|
||||||
} else {
|
|
||||||
cur += direction == 'next' ? 1 : -1
|
|
||||||
DATA.ribbons[cur] = DATA.ribbons[cur].concat(marked).sort(cmp)
|
|
||||||
}
|
|
||||||
|
|
||||||
// remove empty ribbons...
|
|
||||||
DATA.ribbons = DATA.ribbons.filter(function(e){ return e.length > 0 ? true : false })
|
|
||||||
|
|
||||||
updateRibbonOrder()
|
|
||||||
}
|
|
||||||
function shiftMarkedImagesUp(mode, new_ribbon){
|
|
||||||
return shiftMarkedImages('prev', mode, new_ribbon)
|
|
||||||
}
|
|
||||||
function shiftMarkedImagesDown(mode, new_ribbon){
|
|
||||||
return shiftMarkedImages('next', mode, new_ribbon)
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// XXX these are ribbon wise only (???)
|
|
||||||
// XXX this on first step this must pack all marked images
|
|
||||||
function horizontalShiftMarkedImages(direction){
|
|
||||||
}
|
|
||||||
function shiftMarkedImagesLeft(){
|
|
||||||
return shiftMarkedImages('prev')
|
|
||||||
}
|
|
||||||
function shiftMarkedImagesRight(){
|
|
||||||
return shiftMarkedImages('next')
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**********************************************************************
|
/**********************************************************************
|
||||||
* vim:set ts=4 sw=4 spell : */
|
* vim:set ts=4 sw=4 spell : */
|
||||||
|
|||||||
72
ui/marks.js
72
ui/marks.js
@ -182,6 +182,78 @@ function toggleImageMarkBlock(image){
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// XXX need to account for empty ribbons...
|
||||||
|
function shiftMarkedImages(direction, mode, new_ribbon){
|
||||||
|
mode = mode == null ? 'ribbon' : mode
|
||||||
|
var cur = getRibbonIndex()
|
||||||
|
|
||||||
|
// ribbon only...
|
||||||
|
if(mode == 'ribbon'){
|
||||||
|
var ribbon = DATA.ribbons[cur]
|
||||||
|
// remove all the marked images form current ribbon...
|
||||||
|
var marked = $.map(MARKED, function(e){
|
||||||
|
var i = ribbon.indexOf(e)
|
||||||
|
if(i >= 0){
|
||||||
|
ribbon.splice(i, 1)
|
||||||
|
return e
|
||||||
|
}
|
||||||
|
return null
|
||||||
|
})
|
||||||
|
|
||||||
|
// shift all marked images...
|
||||||
|
} else {
|
||||||
|
var marked = MARKED.slice()
|
||||||
|
// remove all the marked images form all the ribbons...
|
||||||
|
$.each(DATA.ribbons, function(ribbon){
|
||||||
|
$.each(marked, function(e){
|
||||||
|
var i = ribbon.indexOf(e)
|
||||||
|
i >= 0 ? ribbon.splice(i, 1) : null
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// if we are at the top or bottom ribbons we need to create a new
|
||||||
|
// ribbon regardless...
|
||||||
|
if((cur == 0 && direction == 'prev')
|
||||||
|
|| (cur == DATA.ribbons.length-1 && direction == 'next')){
|
||||||
|
new_ribbon = true
|
||||||
|
}
|
||||||
|
|
||||||
|
// add marked to new ribbon...
|
||||||
|
if(new_ribbon){
|
||||||
|
cur += direction == 'next' ? 1 : 0
|
||||||
|
DATA.ribbons.splice(cur, 0, marked)
|
||||||
|
|
||||||
|
// add marked to existing ribbon...
|
||||||
|
} else {
|
||||||
|
cur += direction == 'next' ? 1 : -1
|
||||||
|
DATA.ribbons[cur] = DATA.ribbons[cur].concat(marked).sort(cmp)
|
||||||
|
}
|
||||||
|
|
||||||
|
// remove empty ribbons...
|
||||||
|
DATA.ribbons = DATA.ribbons.filter(function(e){ return e.length > 0 ? true : false })
|
||||||
|
|
||||||
|
updateRibbonOrder()
|
||||||
|
}
|
||||||
|
function shiftMarkedImagesUp(mode, new_ribbon){
|
||||||
|
return shiftMarkedImages('prev', mode, new_ribbon)
|
||||||
|
}
|
||||||
|
function shiftMarkedImagesDown(mode, new_ribbon){
|
||||||
|
return shiftMarkedImages('next', mode, new_ribbon)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// XXX these are ribbon wise only (???)
|
||||||
|
// XXX this on first step this must pack all marked images
|
||||||
|
function horizontalShiftMarkedImages(direction){
|
||||||
|
}
|
||||||
|
function shiftMarkedImagesLeft(){
|
||||||
|
return shiftMarkedImages('prev')
|
||||||
|
}
|
||||||
|
function shiftMarkedImagesRight(){
|
||||||
|
return shiftMarkedImages('next')
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**********************************************************************
|
/**********************************************************************
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user