diff --git a/client/src/app/base.component.ts b/client/src/app/base.component.ts index e28c3ed02..0998064f4 100644 --- a/client/src/app/base.component.ts +++ b/client/src/app/base.component.ts @@ -17,6 +17,16 @@ export abstract class BaseComponent { */ private titleSuffix = ' - OpenSlides'; + /** + * Holds the coordinates where a swipe gesture was used + */ + protected swipeCoord?: [number, number]; + + /** + * Holds the time when the user was swiping + */ + protected swipeTime?: number; + /** * Settings for the TinyMCE editor selector */ diff --git a/client/src/app/site/base/base-view.ts b/client/src/app/site/base/base-view.ts index d355e8e20..ada149a9c 100644 --- a/client/src/app/site/base/base-view.ts +++ b/client/src/app/site/base/base-view.ts @@ -64,6 +64,12 @@ export abstract class BaseViewComponent extends BaseComponent implements OnDestr } } + /** + * To catch swipe gestures. + * Should be overwritten by children which need swipe gestures + */ + protected swipe(e: TouchEvent, when: string): void {} + /** * automatically dismisses the error snack bar and clears subscriptions * if the component is destroyed. diff --git a/client/src/app/site/base/list-view-base.ts b/client/src/app/site/base/list-view-base.ts index 096ea0a0e..5a89e5b5f 100644 --- a/client/src/app/site/base/list-view-base.ts +++ b/client/src/app/site/base/list-view-base.ts @@ -60,7 +60,9 @@ export abstract class ListViewBaseComponent -
+