diff --git a/src/frontend/app/app-common.module.ts b/src/frontend/app/app-common.module.ts index daba4a3340cb120230e64833c735fc5e516d03a0..16c1d60839ddab9daf82e6353d7b74d1e5ba8018 100755 --- a/src/frontend/app/app-common.module.ts +++ b/src/frontend/app/app-common.module.ts @@ -3,7 +3,7 @@ import { CommonModule } from '@angular/common'; import { NgModule } from '@angular/core'; /*CORE IMPORTS*/ -import { BrowserModule } from '@angular/platform-browser'; +import { BrowserModule, HammerGestureConfig, HAMMER_GESTURE_CONFIG } from '@angular/platform-browser'; import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; import { FormsModule, ReactiveFormsModule } from '@angular/forms'; import { HttpClientModule } from '@angular/common/http'; @@ -33,6 +33,13 @@ import { SearchHomeComponent } from './search/search-home /*SEARCH*/ import { BasketHomeComponent } from './basket/basket-home.component'; + +export class MyHammerConfig extends HammerGestureConfig { + overrides = <any> { + 'pinch': { enable: false }, + 'rotate': { enable: false } + } +} @NgModule({ imports: [ CommonModule, @@ -81,7 +88,11 @@ import { BasketHomeComponent } from './basket/basket-home SmdFabSpeedDialActions, ], providers: [ - CookieService + CookieService, + { + provide: HAMMER_GESTURE_CONFIG, + useClass: MyHammerConfig + } ], entryComponents: [ IndexingGroupModalComponent diff --git a/src/frontend/app/list/basket-list.component.html b/src/frontend/app/list/basket-list.component.html index 9bfd1dae3b40fd388de33f8cbc38dc2c33a7ed45..5b71dfac98d6a24d348b5a7ac2f28a245df9dcff 100644 --- a/src/frontend/app/list/basket-list.component.html +++ b/src/frontend/app/list/basket-list.component.html @@ -18,7 +18,7 @@ <div class="row" style="margin:0px;"> <div class="col-md-12" style="display:flex;"> <app-filters-tool style="flex:1;" #filtersTool [currentBasketInfo]="currentBasketInfo" [listProperties]="this.listProperties" [snavR]="snav2" (refreshEvent)="refreshDao()"></app-filters-tool> - <mat-paginator [length]="resultsLength" [pageSize]="10" class="paginatorResultList"></mat-paginator> + <mat-paginator #paginatorResultList [length]="resultsLength" [pageSize]="10" class="paginatorResultList"></mat-paginator> </div> </div> @@ -96,7 +96,7 @@ </div> </td> </ng-container> - <tr mat-row *matRowDef="let row; columns: displayedColumnsBasket;" (click)="goTo(row);" style="cursor: pointer;"></tr> + <tr mat-row *matRowDef="let row; columns: displayedColumnsBasket;" (swipeleft)="paginatorResultList.nextPage()" (swiperight)="paginatorResultList.previousPage()" (click)="goTo(row);" style="cursor: pointer;"></tr> </table> </mat-card> </mat-sidenav-content> diff --git a/src/frontend/main.ts b/src/frontend/main.ts index d5ecfb593215efaaa3362adb214d53816358c11c..25876d93b60e92df0c6661371675beb732e2a7a2 100755 --- a/src/frontend/main.ts +++ b/src/frontend/main.ts @@ -1,6 +1,8 @@ import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; import { enableProdMode } from '@angular/core'; +import 'hammerjs'; + import { AppModule } from './app/app.module'; enableProdMode();