mirror of
https://github.com/xuthus83/pigallery2.git
synced 2024-11-03 21:04:03 +08:00
bug fixing
This commit is contained in:
parent
d151c56e77
commit
f5e51212d2
@ -44,7 +44,7 @@ export class GalleryManager implements IGalleryManager {
|
|||||||
cb(null, dir); //WARNING: only on the fly indexing should happen after this point
|
cb(null, dir); //WARNING: only on the fly indexing should happen after this point
|
||||||
|
|
||||||
//on the fly updating
|
//on the fly updating
|
||||||
this.indexDirectory(relativeDirectoryName, cb);
|
return this.indexDirectory(relativeDirectoryName, cb);
|
||||||
}
|
}
|
||||||
return this.indexDirectory(relativeDirectoryName, cb);
|
return this.indexDirectory(relativeDirectoryName, cb);
|
||||||
|
|
||||||
|
@ -27,10 +27,12 @@ export class GridPhoto {
|
|||||||
this.replacementSizeCache = null;
|
this.replacementSizeCache = null;
|
||||||
|
|
||||||
let size = this.getThumbnailSize();
|
let size = this.getThumbnailSize();
|
||||||
for (let i = 0; i < this.photo.readyThumbnails.length; i++) {
|
if (!!this.photo.readyThumbnails) {
|
||||||
if (this.photo.readyThumbnails[i] < size) {
|
for (let i = 0; i < this.photo.readyThumbnails.length; i++) {
|
||||||
this.replacementSizeCache = this.photo.readyThumbnails[i];
|
if (this.photo.readyThumbnails[i] < size) {
|
||||||
break;
|
this.replacementSizeCache = this.photo.readyThumbnails[i];
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -42,7 +44,7 @@ export class GridPhoto {
|
|||||||
}
|
}
|
||||||
|
|
||||||
isThumbnailAvailable() {
|
isThumbnailAvailable() {
|
||||||
return this.photo.readyThumbnails.indexOf(this.getThumbnailSize()) != -1;
|
return this.photo.readyThumbnails && this.photo.readyThumbnails.indexOf(this.getThumbnailSize()) != -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
getReplacementThumbnailPath() {
|
getReplacementThumbnailPath() {
|
||||||
|
Loading…
Reference in New Issue
Block a user