1
0
mirror of https://github.com/xuthus83/pigallery2.git synced 2024-11-03 21:04:03 +08:00

bug fixing

This commit is contained in:
Braun Patrik 2017-06-10 22:56:23 +02:00
parent 8b9f287a88
commit dc3a97ac6c
7 changed files with 14 additions and 13 deletions

View File

@ -149,7 +149,7 @@ export class ThumbnailGeneratorMWs {
__dirname: __dirname,
};
if (Config.Server.enableThreading == true) {
pool.send(imagePath)
pool.send(input)
.on('done', (out) => {
return next(out);
}).on('error', (error) => {
@ -173,4 +173,4 @@ export class ThumbnailGeneratorMWs {
private static generateThumbnailName(imagePath: string, size: number): string {
return crypto.createHash('md5').update(imagePath).digest('hex') + "_" + size + ".jpg";
}
}
}

View File

@ -64,7 +64,7 @@ export class GalleryPhotoComponent implements IRenderable, OnInit, OnDestroy {
ngAfterViewInit() {
//schedule change after Angular checks the model
if (!this.gridPhoto.isThumbnailAvailable()) {
setImmediate(() => {
set Timeout(() => {
let listener: ThumbnailLoadingListener = {
onStartedLoading: () => { //onLoadStarted

View File

@ -121,7 +121,7 @@ export class GalleryLightboxComponent {
//disable scroll
this.overlayService.showOverlay();
setImmediate(() => {
setTimeout(() => {
this.lightboxDimension = <Dimension>{
top: 0,
left: 0,
@ -130,7 +130,7 @@ export class GalleryLightboxComponent {
};
this.blackCanvasOpacity = 1.0;
this.showPhoto(this.gridPhotoQL.toArray().indexOf(selectedPhoto));
});
}, 0);
}
public hide() {

View File

@ -57,14 +57,14 @@ export class GalleryMapLightboxComponent implements OnChanges {
document.getElementsByTagName('body')[0].style.overflow = 'hidden';
this.showImages();
setImmediate(() => {
setTimeout(() => {
this.lightboxDimension = <Dimension>{
top: 0,
left: 0,
width: this.getScreenWidth(),
height: this.getScreenHeight()
};
});
}, 0);
}
public hide() {

View File

@ -68,7 +68,7 @@ export class ThumbnailLoaderService {
path: photo.getIconPath()
});
}
setImmediate(this.run);
setTimeout(this.run, 0);
return thumbnailTaskEntity;
}
@ -103,7 +103,7 @@ export class ThumbnailLoaderService {
path: photo.getThumbnailPath()
});
}
setImmediate(this.run);
setTimeout(this.run, 0);
return thumbnailTaskEntity;
}

View File

@ -77,7 +77,7 @@ export class IconThumbnail extends ThumbnailBase {
}
if (!this.photo.isIconAvailable()) {
setImmediate(() => {
setTimeout(() => {
let listener: ThumbnailLoadingListener = {
onStartedLoading: () => { //onLoadStarted
@ -101,7 +101,7 @@ export class IconThumbnail extends ThumbnailBase {
this.thumbnailTask = this.thumbnailService.loadIcon(this.photo, ThumbnailLoadingPriority.high, listener);
});
}, 0);
}
}
@ -134,7 +134,7 @@ export class Thumbnail extends ThumbnailBase {
}
if (!this.photo.isThumbnailAvailable()) {
setImmediate(() => {
setTimeout(() => {
let listener: ThumbnailLoadingListener = {
onStartedLoading: () => { //onLoadStarted
@ -162,7 +162,7 @@ export class Thumbnail extends ThumbnailBase {
}
});
}, 0);
}
}

View File

@ -8,6 +8,7 @@
"main": "./backend/server.js",
"scripts": {
"build": "ng build",
"pretest": "tsc",
"test": "ng test --single-run && mocha --recursive test/backend/unit",
"start": "node ./backend/server",
"ng": "ng",