mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-29 10:20:08 +00:00
...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
9f29868ff1
commit
b308f6b3b7
@ -283,11 +283,15 @@ var FileSystemLoaderActions = actions.Actions({
|
|||||||
})
|
})
|
||||||
}],
|
}],
|
||||||
|
|
||||||
|
// Get images in path...
|
||||||
|
//
|
||||||
// This will:
|
// This will:
|
||||||
// - get images from path
|
// - get images from path
|
||||||
// - get basic stat data
|
// - get basic stat data
|
||||||
// - get previews from path if they exist
|
// - get previews from path if they exist
|
||||||
//
|
//
|
||||||
|
// Returns: Images object
|
||||||
|
//
|
||||||
getImagesInPath: ['- File/',
|
getImagesInPath: ['- File/',
|
||||||
function(path, read_stat, skip_preview_search, logger){
|
function(path, read_stat, skip_preview_search, logger){
|
||||||
if(path == null){
|
if(path == null){
|
||||||
@ -371,7 +375,7 @@ var FileSystemLoaderActions = actions.Actions({
|
|||||||
// XXX use the logger...
|
// XXX use the logger...
|
||||||
// XXX add a recursive option...
|
// XXX add a recursive option...
|
||||||
// ...might also be nice to add sub-dirs to ribbons...
|
// ...might also be nice to add sub-dirs to ribbons...
|
||||||
// XXX add option to preserve/update .data
|
// XXX add option to preserve/update .data (???)
|
||||||
// XXX make image pattern more generic...
|
// XXX make image pattern more generic...
|
||||||
loadImages: ['- File/Load images',
|
loadImages: ['- File/Load images',
|
||||||
function(path, logger){
|
function(path, logger){
|
||||||
|
|||||||
@ -365,7 +365,7 @@ function(path, index_dir, logger){
|
|||||||
})
|
})
|
||||||
.then(function(paths){
|
.then(function(paths){
|
||||||
// start loading...
|
// start loading...
|
||||||
Promise.all(paths.map(function(p){
|
return Promise.all(paths.map(function(p){
|
||||||
//var path = pathlib.normalize(p +'/'+ index_dir)
|
//var path = pathlib.normalize(p +'/'+ index_dir)
|
||||||
var path = util.normalizePath(p +'/'+ index_dir)
|
var path = util.normalizePath(p +'/'+ index_dir)
|
||||||
return loadSaveHistoryList(path, index_dir)
|
return loadSaveHistoryList(path, index_dir)
|
||||||
@ -377,8 +377,9 @@ function(path, index_dir, logger){
|
|||||||
// itself in the base path...
|
// itself in the base path...
|
||||||
res[p] = obj
|
res[p] = obj
|
||||||
})
|
})
|
||||||
})).then(function(){ resolve(res) })
|
}))
|
||||||
})
|
})
|
||||||
|
.then(function(){ resolve(res) })
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user