diff --git a/Viewer/cfg/requirejs.js b/Viewer/cfg/requirejs.js index 36305fd0..0c296d05 100644 --- a/Viewer/cfg/requirejs.js +++ b/Viewer/cfg/requirejs.js @@ -55,11 +55,11 @@ var setup = function(require, root){ //'ext-lib/preact': './node_modules/preact/dist/preact.dev', 'lib/doc': 'node_modules/ig-doc/doc', + 'lib/stoppable': 'node_modules/ig-stoppable/stoppable', 'lib/object': 'node_modules/ig-object/object', 'lib/types': 'node_modules/ig-types/', 'lib/actions': 'node_modules/ig-actions/actions', 'lib/features': 'node_modules/ig-features/features', - 'lib/stoppable': 'node_modules/ig-stoppable/stoppable', //'lib/keyboard': './node_modules/ig-keyboard/keyboard', 'object-run': 'node_modules/object-run/run', diff --git a/Viewer/features/filesystem.js b/Viewer/features/filesystem.js index 7a78f44d..b553ca17 100755 --- a/Viewer/features/filesystem.js +++ b/Viewer/features/filesystem.js @@ -420,6 +420,7 @@ var FileSystemLoaderActions = actions.Actions({ // given path??? getPreviews: ['- File/', function(pattern, path, images){ + var that = this images = images || this.images pattern = pattern == 'current' ? this.current + '*' : pattern == 'all' ? '*' @@ -451,16 +452,15 @@ var FileSystemLoaderActions = actions.Actions({ var rel = pathlib.relative(images[gid].base_path, base) images[gid].path = pathlib.join(rel, images[gid].path) - images[gid].base_path = base - } + images[gid].base_path = base } - images[gid].preview = p[gid].preview - } - }) - } - return images - }) - }], + images[gid].preview = p[gid].preview + // XXX should we check if things have changed??? + that.markChanged('images', [gid]) } }) } + return images }) }], + // XXX indicate progress??? + getAllPreviews: ['File/Update image preview list', + 'getPreviews: "all"'], // Get images in path... //