diff --git a/backend/model/threading/DiskMangerWorker.ts b/backend/model/threading/DiskMangerWorker.ts index 543a56da..876e075a 100644 --- a/backend/model/threading/DiskMangerWorker.ts +++ b/backend/model/threading/DiskMangerWorker.ts @@ -52,14 +52,7 @@ export class DiskMangerWorker { }); try { - const exif_obj = exif_parser.create(data); - - exif_obj.enableTagNames(true); - exif_obj.enableImageSize(true); - exif_obj.enableReturnTags(true); - const exif = exif_obj.parse(); - - Logger.debug(LOG_TAG, "exif data", exif); + const exif = exif_parser.create(data).parse(); metadata.cameraData = { ISO: exif.tags.ISO, model: exif.tags.Model, diff --git a/frontend/app/gallery/lightbox/infopanel/info-panel.lightbox.gallery.component.html b/frontend/app/gallery/lightbox/infopanel/info-panel.lightbox.gallery.component.html index 68e4c519..14b79bfe 100644 --- a/frontend/app/gallery/lightbox/infopanel/info-panel.lightbox.gallery.component.html +++ b/frontend/app/gallery/lightbox/infopanel/info-panel.lightbox.gallery.component.html @@ -81,7 +81,7 @@ [disableDefaultUI]="true" [zoomControl]="false" [streetViewControl]="false" - [zoom]="5" + [zoom]="6" [latitude]="photo.metadata.positionData.GPSData.latitude" [longitude]="photo.metadata.positionData.GPSData.longitude"> - -
-
+
+
- + [download]="activePhoto.gridPhoto.photo.name"> + + + - -
- - + +
+ + + +
; + private timerSub: Subscription; + public playBackState: number = 0; + public controllersDimmed = true; + public controllersVisible = true; public infoPanelVisible = false; public infoPanelWidth = 0; @@ -48,8 +53,12 @@ export class GalleryLightboxComponent implements OnDestroy { private _builder: AnimationBuilder) { } + ngOnInit(): void { + this.timer = Observable.timer(1000, 2000); + } ngOnDestroy(): void { + this.pause(); if (this.changeSubscription != null) { this.changeSubscription.unsubscribe(); } @@ -76,6 +85,7 @@ export class GalleryLightboxComponent implements OnDestroy { } public prevImage() { + this.pause(); if (this.activePhotoId > 0) { this.showPhoto(this.activePhotoId - 1); return; @@ -87,6 +97,7 @@ export class GalleryLightboxComponent implements OnDestroy { activePhotoId: number = null; private showPhoto(photoIndex: number, resize: boolean = true) { + console.log("showing photo"); this.activePhoto = null; this.changeDetector.detectChanges(); this.updateActivePhoto(photoIndex, resize); @@ -120,6 +131,8 @@ export class GalleryLightboxComponent implements OnDestroy { startPhotoDimension: Dimension = {top: 0, left: 0, width: 0, height: 0}; public show(photo: PhotoDTO) { + this.controllersVisible = true; + this.showControls(); console.log(this.photoElement); this.visible = true; let selectedPhoto = this.findPhotoComponent(photo); @@ -149,6 +162,7 @@ export class GalleryLightboxComponent implements OnDestroy { } public hide() { + this.controllersVisible = false; this.fullScreenService.exitFullScreen(); const lightboxDimension = this.activePhoto.getDimension(); @@ -343,5 +357,58 @@ export class GalleryLightboxComponent implements OnDestroy { return {top: top, left: left, width: width, height: height}; } + + visibilityTimer = null; + + @HostListener('mousemove') + onMousemove() { + this.showControls(); + } + + private showControls() { + this.controllersDimmed = true; + if (this.visibilityTimer != null) { + clearTimeout(this.visibilityTimer); + } + this.visibilityTimer = setTimeout(this.hideControls, 2000); + } + + private hideControls = () => { + + this.controllersDimmed = false; + }; + + public pause() { + if (this.timerSub != null) { + this.timerSub.unsubscribe(); + } + this.playBackState = 0; + } + + public play() { + console.log("play"); + this.pause(); + this.timerSub = this.timer.filter(t => t % 2 == 0).subscribe(() => { + if (this.navigation.hasNext) { + this.nextImage(); + } else { + this.showPhoto(0); + } + }); + this.playBackState = 1; + } + + public fastForward() { + console.log("fastForward"); + this.pause(); + this.timerSub = this.timer.subscribe(() => { + if (this.navigation.hasNext) { + this.nextImage(); + } else { + this.showPhoto(0); + } + }); + this.playBackState = 2; + } }