From 8ec734dfb7fdd98a5fa1a60070e944840b335ac8 Mon Sep 17 00:00:00 2001 From: "Patrik J. Braun" Date: Mon, 19 Apr 2021 17:26:35 +0200 Subject: [PATCH] Fixing missing hammerjs module (fixes mobile touch support) #144 It is needed since angular 9. Tested on Pixel4, Ipad Air --- src/frontend/app/app.module.ts | 3 ++- .../lightbox/controls/controls.lightbox.gallery.component.ts | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/frontend/app/app.module.ts b/src/frontend/app/app.module.ts index 02013db1..193fc86e 100644 --- a/src/frontend/app/app.module.ts +++ b/src/frontend/app/app.module.ts @@ -1,5 +1,5 @@ import {Injectable, NgModule} from '@angular/core'; -import {BrowserModule, HAMMER_GESTURE_CONFIG, HammerGestureConfig} from '@angular/platform-browser'; +import {BrowserModule, HAMMER_GESTURE_CONFIG, HammerGestureConfig, HammerModule} from '@angular/platform-browser'; import {FormsModule} from '@angular/forms'; import {AppComponent} from './app.component'; import {UserService} from './model/network/user.service'; @@ -129,6 +129,7 @@ export class CustomUrlSerializer implements UrlSerializer { @NgModule({ imports: [ BrowserModule, + HammerModule, FormsModule, HttpClientModule, BrowserAnimationsModule, diff --git a/src/frontend/app/ui/gallery/lightbox/controls/controls.lightbox.gallery.component.ts b/src/frontend/app/ui/gallery/lightbox/controls/controls.lightbox.gallery.component.ts index 118f8e07..5365e432 100644 --- a/src/frontend/app/ui/gallery/lightbox/controls/controls.lightbox.gallery.component.ts +++ b/src/frontend/app/ui/gallery/lightbox/controls/controls.lightbox.gallery.component.ts @@ -1,5 +1,5 @@ import {Component, ElementRef, EventEmitter, HostListener, Input, OnChanges, OnDestroy, OnInit, Output, ViewChild} from '@angular/core'; -import {MediaDTO, MediaDTOUtils} from '../../../../../../common/entities/MediaDTO'; +import {MediaDTOUtils} from '../../../../../../common/entities/MediaDTO'; import {FullScreenService} from '../../fullscreen.service'; import {GalleryPhotoComponent} from '../../grid/photo/photo.grid.gallery.component'; import {Observable, Subscription, timer} from 'rxjs'; @@ -370,7 +370,7 @@ export class ControlsLightboxComponent implements OnDestroy, OnInit, OnChanges { private hideControls = () => { this.controllersDimmed = true; - } + }; private updateFaceContainerDim(): void { if (!this.activePhoto) {