mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-29 10:20:08 +00:00
experiemnting...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
631a612541
commit
d912ce2ebe
@ -673,24 +673,24 @@ var FileSystemLoaderActions = actions.Actions({
|
||||
})
|
||||
}],
|
||||
|
||||
// Load new images...
|
||||
//
|
||||
// Load new images from current path...
|
||||
// .loadNewImages()
|
||||
// -> promise
|
||||
//
|
||||
// Load new images from path...
|
||||
// .loadNewImages(path)
|
||||
// -> promise
|
||||
//
|
||||
// This will prepend images in path (default .location.path) that
|
||||
// were not loaded in index...
|
||||
//
|
||||
// NOTE: this will not load images that are already loaded.
|
||||
//
|
||||
// XXX revise logger...
|
||||
// XXX revise alignment...
|
||||
loadNewImages: ['File/Load new images',
|
||||
core.doc`Load new images...
|
||||
|
||||
Load new images from current path...
|
||||
.loadNewImages()
|
||||
-> promise
|
||||
|
||||
Load new images from path...
|
||||
.loadNewImages(path)
|
||||
-> promise
|
||||
|
||||
This will prepend images in path (default .location.path) that
|
||||
were not loaded in index...
|
||||
|
||||
NOTE: this will not load images that are already loaded.
|
||||
`,
|
||||
function(path, logger){
|
||||
path = path || this.location.path
|
||||
|
||||
@ -829,10 +829,14 @@ var FileSystemLoaderActions = actions.Actions({
|
||||
return res.flat() })
|
||||
}],
|
||||
|
||||
// XXX should this take a path argument???
|
||||
// XXX not yet sure about this...
|
||||
removeMissingImages: ['File/Remove missing images from index',
|
||||
core.doc`Remove missing images from index
|
||||
|
||||
.removeMissingImages()
|
||||
-> promise
|
||||
|
||||
This will remove images that are not found via their original
|
||||
path/name from the index.
|
||||
|
||||
@ -879,6 +883,25 @@ var FileSystemLoaderActions = actions.Actions({
|
||||
that.data.clear(res)
|
||||
logger && rem_logger.emit('done', 'data cleanup') }
|
||||
return res }) }],
|
||||
|
||||
|
||||
// XXX EXPERIMENTAL...
|
||||
// shorthand...
|
||||
syncIndexWithDir: ['- File/',
|
||||
core.doc`Load new and remove deleted images...
|
||||
|
||||
.syncIndexWithDir()
|
||||
-> promise
|
||||
|
||||
|
||||
This will call:
|
||||
.loadNewImages()
|
||||
.removeMissingImages()
|
||||
`,
|
||||
function(logger){
|
||||
return Promise.all([
|
||||
this.loadNewImages(),
|
||||
this.removeMissingImages(), ]) }],
|
||||
})
|
||||
|
||||
|
||||
|
||||
@ -263,7 +263,9 @@ module.GLOBAL_KEYBOARD = {
|
||||
ctrl_F: 'F11',
|
||||
meta_F: 'F11',
|
||||
|
||||
ctrl_R: 'loadNewImages!',
|
||||
// XXX EXPERIMENTAL: which should it be???
|
||||
//ctrl_R: 'loadNewImages!',
|
||||
ctrl_R: 'syncIndexWithDir!',
|
||||
ctrl_alt_R: 'reload!',
|
||||
ctrl_shift_R: 'F5',
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user