mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-12-27 13:32:01 +00:00
Compare commits
2 Commits
9425b3ccc1
...
e1e4324f90
| Author | SHA1 | Date | |
|---|---|---|---|
| e1e4324f90 | |||
| bb3f3f2ea0 |
@ -239,7 +239,8 @@ var FileSystemLoaderActions = actions.Actions({
|
||||
// NOTE: this will not match "dot filenames", this is done
|
||||
// intentionally to avoid the previews MAC computers
|
||||
// generate all over the place...
|
||||
'image-file-pattern': '*.@(jpg|jpeg|png|svg|JPG|JPEG|PNG|SVG)',
|
||||
// XXX make the pattern case-agnostic (see .imageFilePattern)
|
||||
'image-file-pattern': '*.@(jpg|jpeg|png|svg|gif)',
|
||||
|
||||
'image-file-read-stat': true,
|
||||
'image-file-skip-previews': false,
|
||||
@ -247,6 +248,16 @@ var FileSystemLoaderActions = actions.Actions({
|
||||
'default-load-method': 'loadIndex',
|
||||
},
|
||||
|
||||
// NOTE: this is not called too often thus there is not need to cache...
|
||||
get imageFilePattern(){
|
||||
return this.config['image-file-pattern']
|
||||
.replace(/([a-z]+)/g,
|
||||
function(e){
|
||||
return e +'|'+ e.toUpperCase() }) },
|
||||
set imageFilePattern(value){
|
||||
this.config['image-file-pattern'] = value },
|
||||
|
||||
|
||||
// XXX is this a hack???
|
||||
// XXX need a more generic form...
|
||||
checkPath: ['- File/',
|
||||
@ -501,7 +512,7 @@ var FileSystemLoaderActions = actions.Actions({
|
||||
// get the image list...
|
||||
return new Promise(function(resolve, reject){
|
||||
var files = {}
|
||||
glob.globStream(path + '/'+ that.config['image-file-pattern'], {
|
||||
glob.globStream(path +'/'+ that.imageFilePattern, {
|
||||
stat: !!read_stat,
|
||||
withFileTypes: true,
|
||||
strict: false,
|
||||
@ -1153,7 +1164,7 @@ var FileSystemLoaderUIActions = actions.Actions({
|
||||
|
||||
var o = browseWalk.makeWalk(null,
|
||||
base,
|
||||
this.config['image-file-pattern'],
|
||||
this.imageFilePattern,
|
||||
cfg)
|
||||
// path selected...
|
||||
.open(function(evt, path){
|
||||
|
||||
4
Viewer/package-lock.json
generated
4
Viewer/package-lock.json
generated
@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "ImageGrid.Viewer.g4",
|
||||
"version": "4.0.10a",
|
||||
"version": "4.0.11a",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "ImageGrid.Viewer.g4",
|
||||
"version": "4.0.10a",
|
||||
"version": "4.0.11a",
|
||||
"dependencies": {
|
||||
"app-module-path": "*",
|
||||
"async-json": "0.0.2",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user