mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-28 18:00:09 +00:00
cleanup and minor fixes...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
10df416043
commit
2680a6160a
@ -3131,6 +3131,8 @@ var TaskActions = actions.Actions({
|
|||||||
|
|
||||||
// Links...
|
// Links...
|
||||||
//
|
//
|
||||||
|
// NOTE: all links to current state in .links will be detached on .clear()
|
||||||
|
//
|
||||||
// XXX after this is stabilized, do we need session tasks and its complexities???
|
// XXX after this is stabilized, do we need session tasks and its complexities???
|
||||||
__links: null,
|
__links: null,
|
||||||
get links(){
|
get links(){
|
||||||
@ -3268,17 +3270,20 @@ module.Tasks = ImageGridFeatures.Feature({
|
|||||||
handlers: [
|
handlers: [
|
||||||
// stop session tasks...
|
// stop session tasks...
|
||||||
['clear',
|
['clear',
|
||||||
// XXX BUG: for some reason calling .abort here does not work...
|
|
||||||
//'sessionTasks.stop'],
|
|
||||||
'sessionTasks.abort'],
|
'sessionTasks.abort'],
|
||||||
|
|
||||||
|
// detach links to current state...
|
||||||
['clear.pre',
|
['clear.pre',
|
||||||
function(){
|
function(){
|
||||||
|
var that = this
|
||||||
Object.values(this.links || [])
|
Object.values(this.links || [])
|
||||||
.forEach(function(link){
|
.forEach(function(link){
|
||||||
// NOTE: we do a partial detach here as .clear(..) will
|
// only detach links to current state...
|
||||||
// detach the data for us...
|
link.data === that.data
|
||||||
link.detachLink(false) }) }],
|
&& link.images === that.images
|
||||||
|
// NOTE: we do a partial detach here as .clear(..) will
|
||||||
|
// detach the data for us...
|
||||||
|
&& link.detachLink(false) }) }],
|
||||||
],
|
],
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@ -859,10 +859,6 @@ var FileSystemLoaderActions = actions.Actions({
|
|||||||
// independently it would require a separate wrapper...
|
// independently it would require a separate wrapper...
|
||||||
// ...this seems quire a bit more convoluted than the current
|
// ...this seems quire a bit more convoluted than the current
|
||||||
// .indexCheckerActions + .checkIndex(..) pair...
|
// .indexCheckerActions + .checkIndex(..) pair...
|
||||||
// XXX since this by default runs in a .linked context this will update
|
|
||||||
// the current context state if it was not reloaded but .changes if
|
|
||||||
// it was set to false will not reflect the changes made by the
|
|
||||||
// checker actions...
|
|
||||||
checkIndex: ['File/Check index consistency',
|
checkIndex: ['File/Check index consistency',
|
||||||
core.doc`
|
core.doc`
|
||||||
|
|
||||||
@ -892,14 +888,7 @@ var FileSystemLoaderActions = actions.Actions({
|
|||||||
// XXX BUG?: this is not returned by the action for some reason...
|
// XXX BUG?: this is not returned by the action for some reason...
|
||||||
return res }) }],
|
return res }) }],
|
||||||
|
|
||||||
// XXX add a context wrapper a-la .makeIndex(..)...
|
|
||||||
// ...might be a good idea to rename this to .checkIndexPaths(..)
|
|
||||||
// and make the .checkIndex(..) a context aggregate actions like
|
|
||||||
// .makeIndex(..)
|
|
||||||
// XXX might be a good idea to also search for previews here...
|
// XXX might be a good idea to also search for previews here...
|
||||||
// XXX technically this can be a non-session queue, but we'll
|
|
||||||
// need to save the check results...
|
|
||||||
// XXX update .handlers to maintain .changes via promise...
|
|
||||||
checkIndexPaths: ['- File/',
|
checkIndexPaths: ['- File/',
|
||||||
core.doc`Check index image path consistency
|
core.doc`Check index image path consistency
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user